Unicode Strings and Bitmap Fonts

Started by
0 comments, last by Anon Mike 18 years, 1 month ago
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
________________________
Pretty In Pink
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".
-Mike

This topic is closed to new replies.

Advertisement