• Advertisement
Sign in to follow this  

Wanting to make a program that creates font textures...

This topic is 4185 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 know that several of these programs exist, but I want to create my own. I was thinking of using MFC (the windows API I'm most-familiar with), with the texture creation being done with GDI. I want to also include a data file that contains the width of each character. If I can also extract hinting and kerning information too, that would be doubly-awesome. Does anyone know how to "Read" this information from the TTF files?

Share this post


Link to post
Share on other sites
Advertisement
This might help: TrueType Specification.

BTW, I know very little about TrueType. All I did to find this was to search [google] for "TTF format", then click on the Wikipedia result, and scroll to the bottom. I found the specification in less time than it took to type this reply.

Share this post


Link to post
Share on other sites
I think NeHe uses GDI to load TTF fonts and render them to a texture in one of his tutorials about bitmap fonts. I believe the information you are looking for might present itself in that tutorial.

NeHe Productions

Share this post


Link to post
Share on other sites
Writing your own custom TTF parser is an overkill, unless you want to do it as a challenge of course. I would suggest you to get the FreeType library (freetype.org). It handles a lot of font formats transparently. All you have to do is open the font file, and extract the glyps (at a desired font size) into a series of bitmaps for rendering. FreeType caters for kerning and other advanced stuff too.

Share this post


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

  • Advertisement