ReadableFont class
#include <Jazz2/UI/Windows/ReadableFont.h>
Readable font of the interface, drawn from an outline font at the size text has.
The plainer font the interface switches to from the pixel font of the game, see Theme::Editor/Fonts/Roboto-Regular.ttf of the content the first time text is shown at a scale, at exactly the size it has there, so the text is crisp at any scale — the pixel font is crisp only at whole multiples of its size. It's measured in the units of the pixel font and its lines are as high, so the interface keeps its layout when the font is switched. The glyphs are gray with a dark rim, as those of the pixel font are, so the colors of text tint them the same way.
The surface of the interface owns it, see Context::
Constructors, destructors, conversion operators
- ReadableFont()
- ~ReadableFont()
- ReadableFont(const ReadableFont&) deleted
Public functions
Function documentation
UI:: Font* Jazz2:: UI:: Windows:: ReadableFont:: Get(float textScale)
Returns the font for text drawn at a scale, or nullptr if the font file can't be read.
The scale is that of text, see Theme::