Skip to main content
GameDev.net gamedev.net
🔒 Locked

FontManager

Started by Alundra Jul 3, 2018 at 9:40 AM 1 replies 900+ views
Original Post
Alundra
Alundra

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

LorenzoGatti
LorenzoGatti

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.