FontManager

Started by
1 comment, last by LorenzoGatti 5 years, 9 months ago

Hi,
I have a font class loading glyph when you need and add then in a image and then update the texture.
The question is now how make the font manager correctly ? Two options :
1) Have a font class who handle multiple font size then the manager only link to one font by name
2) Have a font name with the size in it
Another options or better options ?
What is recommended ?
Thank you

Advertisement

You can probably use a two-level hierarchy: a strictly read-only and shareable font corresponding to the content of a font file and a text rendering style (size, but also stroke pattern, colour, OpenType features, character encoding, etc.) that references a font.

The combination of font, style, a text string and probably some indication about the output (e.g. a pointer to an image buffer) would be the input of the metrics and text rendering routines. You only need to worry about font names if they are presented to a human user.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement