#include <GFont.h>
Inherits GLibrary.
Public Member Functions | |
bool | EnumerateFonts (List< const char > &Fonts) |
Enumerate all installed fonts. | |
bool | GetGlyphSubSupport () |
Returns whether the current Lgi implementation supports glyph sub. | |
bool | GetDefaultGlyphSub () |
Returns whether glyph sub is currently turned on. | |
void | SetDefaultGlyphSub (bool i) |
Turns the glyph sub feature on or off. | |
GFont * | GetGlyph (int u, GFont *UserFont) |
Returns a font that can render the specified unicode code point. | |
GFont * | GetBestFont (char *Str) |
Static Public Member Functions | |
static GFontSystem * | Inst () |
Get a pointer to the font system. | |
Friends | |
class | GApp |
class | GDisplayString |
Returns a font that can render the specified unicode code point.
u | A utf-32 character |
UserFont | The base font used for rendering |
References GFont::Create(), DLinkList::Empty(), EnumerateFonts(), GTypeFace::Face(), List< Type >::First(), GFont::GetGlyphMap(), List< Type >::Insert(), Inst(), LGI_OS_LINUX, LGI_OS_WIN9X, LGI_OS_WINNT, and List< Type >::Next().
Referenced by GetBestFont().
GFont * GFontSystem::GetBestFont | ( | char * | Str | ) |
This looks for a font that can contains the most glyphs for a given string, ideally it can render the whole thing. But the next best alternative is returned when no font matches all characters in the string.
References List< Type >::First(), GetGlyph(), List< Type >::Insert(), List< Type >::Next(), and SysFont.