Jump to content
  • Advertisement
Sign in to follow this  
dpadam450

OpenGL OpenGL Fonts Tip

This topic is 938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I went back into my old font code which is from the old NEHE tutorial years ago. I finally had the need to support multiple fonts because I actually want to release a game. I'm using wglUseFontBitmaps and CreateFont.

 

Anyway maybe someone will stumble upon this and help them down the road but it took me a while to figure. The tutorial was using ANSI_CHARSET instead of  DEFAULT_CHARSET, so 99% of the fonts I used seemed to not work at all. For instance webdings wasn't showing symbols but was printing like a normal font.

font = CreateFont(  -1*fontSize,
                        0,
                        0,
                        0,
                        FW_DONTCARE,
                        FALSE,
                        FALSE,
                        FALSE,
                        DEFAULT_CHARSET,
                        OUT_TT_PRECIS,
                        CLIP_DEFAULT_PRECIS,
                        ANTIALIASED_QUALITY,
                        FF_DONTCARE|DEFAULT_PITCH,
                        fontName);

Share this post


Link to post
Share on other sites
Advertisement

I would say don't use NeHe tutorials for anything anymore.  They're so outdated.

I use FreeType 2, there are plenty of tutorials for it too.

Share this post


Link to post
Share on other sites

 

I would say don't use NeHe tutorials for anything anymore.  They're so outdated.

I'm outdated. I'm on GL 2 still.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!