Skip to main content
gamedev.net
🔒 Locked

Write Text to screen

Started by Ioxunimous 2 replies 550+ views
Original Post
Ioxunimous
Ioxunimous
Hi I have made a function who write text to screen. Unforturnately it dont work so well. I cant make the right fonttype, like Verdana, Times New Roman etc. Also the height and width dont work Here is the function header: BOOL FONT::MakeFont(char *fontname, int height, int width, BOOL Italic, BOOL Underline, BOOL Strikeout) I init the font with this function. The lines who configure height, width and fonttype: if(!height) { m_height = height; } if(!width) { m_width = width; } height = m_height; width = m_width; CreateFont(height, // Height Of Font width, // Width Of Font 0, // Angle Of Escapement 0, // Orientation Angle FW_BOLD, // Font Weight Italic, // Italic Underline, // Underline Strikeout, // Strikeout ANSI_CHARSET, // Character Set Identifier OUT_TT_PRECIS, // Output Precision CLIP_DEFAULT_PRECIS, // Clipping Precision ANTIALIASED_QUALITY, // Output Quality FF_DONTCARE|DEFAULT_PITCH, // Family And Pitch fontname); // Font Name What is wrong of my function? // Ioxunimous
Psycho-Coder
Psycho-Coder
Check the NeHe Tutorials there are about five font tutorials.
davepermen
davepermen
check my page, in the coding section i have a nice font-class in "TheBeginning.zip"

hehe, shameless plug, i know:D

http://davepermen.net

"take a look around" - limp bizkit
www.google.com
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia
My Page davepermen.net | My Music on Bandcamp and on Soundcloud
Ioxunimous
Ioxunimous
Well I know now what i did wrong:

Those lines should not be there:
height = m_height;
width = m_width;

Thanks

// Ioxunimous

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.