ScummVM API documentation
Graphics::MacFontManager Class Reference

Public Member Functions

 MacFontManager (uint32 mode, Common::Language language)
 
void setLocalizedFonts ()
 
bool hasBuiltInFonts ()
 
const FontgetFont (MacFont *macFont)
 
const FontgetFont (MacFont macFont)
 
const Common::String getFontName (uint16 id, int size, int slant=kMacFontRegular, bool tryGen=false)
 
const Common::String getFontName (const MacFont &font)
 
int getFontIdByName (Common::String name)
 
Common::Language getFontLanguage (uint16 id)
 
Common::CodePage getFontEncoding (uint16 id)
 
int getFontAliasForId (uint16 id)
 
Common::String getFontName (uint16 id)
 
void loadFonts (Common::SeekableReadStream *stream)
 
void loadFonts (const Common::Path &fileName)
 
void loadFonts (Common::MacResManager *fontFile)
 
void loadWindowsFont (const Common::Path &fileName)
 
int registerFontName (Common::String name, int preferredId=-1)
 
void forceBuiltinFonts ()
 
int parseSlantFromName (const Common::String &name)
 
const Common::Array< MacFontFamily * > & getFontFamilies ()
 
void printFontRegistry (int debugLevel, uint32 channel)
 
int registerTTFFont (const Graphics::TTFMap ttfList[])
 
int getFamilyId (int newId, int newSlant)
 

Member Function Documentation

◆ hasBuiltInFonts()

bool Graphics::MacFontManager::hasBuiltInFonts ( )
inline

Accessor method to check the presence of built-in fonts.

Returns
True if there are bult-in fonts.

◆ getFont()

const Font* Graphics::MacFontManager::getFont ( MacFont macFont)

Retrieve a font from the available ones.

Parameters
nameName of the desired font.
fallbackFallback policy in case the desired font isn't there.
Returns
The requested font or the fallback.

◆ getFontName()

const Common::String Graphics::MacFontManager::getFontName ( uint16  id,
int  size,
int  slant = kMacFontRegular,
bool  tryGen = false 
)

Return font name from standard ID

Parameters
idID of the font
sizesize of the font
Returns
the font name or NULL if ID goes beyond the mapping

◆ registerFontName()

int Graphics::MacFontManager::registerFontName ( Common::String  name,
int  preferredId = -1 
)

Register a font name if it doesn't already exist.

Parameters
namename of the font
Returns
the font's ID

The documentation for this class was generated from the following file: