[F4-users] Re: font
Status: Pre-Alpha
Brought to you by:
starkos
|
From: J. P. <ja...@37...> - 2002-06-13 15:14:31
|
Raul Aguaviva wrote: > in the screenshot of the font.... > How did you manage to pack that way all the letters of the font?? Have a look at... F4/Services/Text/Src/font_factory.cpp: createTextureFont() It's brute force, but it runs fairly quickly and produces great results (as you can see). To summarize: - I use two textures, one for the glyphs and one for a mask, which indicates what parts of the texture have already been used. - I sort the glyphs from largest to smallest. - I try to keep the used space as close to a square as possible Hope that helps. Let me know if you have any questions. Jason 379 |