bool MapFont(const char* pfontName, const char* pnewFontName, MapFontFlags mff = MFF_Original, float scaleFactor = 1.0f, float baselineOffsetModifier = 0.0f); bool MapFont(const wchar_t* pfontName, const wchar_t* pnewFontName, MapFontFlags mff = MFF_Original, float scaleFactor = 1.0f, float baselineOffsetModifier = 0.0f);
MapFont adds a font mapping. Font names are expressed in UTF-8 in the char version and Unicode in the wchar_t version. A function will fail if a mapping for this font already exists, overwriting a map is not allowed.
Parameters |
Description |
const char* pfontName |
Name of the font which has to be mapped. |
const char* pnewFontName |
Name of the font to which mapping is done. |
MapFontFlags mff = MFF_Original |
Default value of the font. |
float scaleFactor = 1.0f |
Scale factor of the font. |
float baselineOffsetModifier = 0.0f |
An offset to the baseline of the font when it is rendered, essentially moving text up (or down) within a textfield. This is useful if you are localizing your game, and the font being substituted has glyphs with a drastically different baseline than the original. |