Jump to content
  • Advertisement
Sign in to follow this  
PrincessDaisy

Unicode Strings and Bitmap Fonts

This topic is 4522 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 am in the process of converting some code to unicode based strings rather than char, and I am just looking for peoples opinions on how to deal with bitmap based fonts. When I was using char based strings, I could create a simple texture with the required characters and use that for rendering. Obviously, I cannot do this with unicode characters. How have people solved this in the past and what solutions did you come up with? Thanks Daisy

Share this post


Link to post
Share on other sites
Advertisement
What you do is to have some method of converting character values to glyph indexes. For example you might map 'A' to glyph #1 in your bitmap font.

Exactly how you do the mapping is up to you. If you want a real-life example, here all all the gory details of how truetype fonts do character to glyph mapping. In particular the sections called "Format 4" and "Format 12".

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!