Contents Up Previous Next

wxFontNameDirectory: wxObject

Overview

There is a single instance of this class, called wxTheFontNameDirectory. Its purpose is to manage font names and identifiers for the portable font system, which is mandatory under X and optional under Windows.

wxFontNameDirectory::wxFontNameDirectory
wxFontNameDirectory::~wxFontNameDirectory
wxFontNameDirectory::FindOrCreateFontId
wxFontNameDirectory::GetAFMName
wxFontNameDirectory::GetFamily
wxFontNameDirectory::GetFontId
wxFontNameDirectory::GetFontName
wxFontNameDirectory::GetNewFontId
wxFontNameDirectory::GetPostScriptName
wxFontNameDirectory::GetScreenName
wxFontNameDirectory::Initialize


wxFontNameDirectory::wxFontNameDirectory

void wxFontNameDirectory(void)

Constructor.


wxFontNameDirectory::~wxFontNameDirectory

void ~wxFontNameDirectory(void)

Destructor.


wxFontNameDirectory::FindOrCreateFontId

int FindOrCreateFontId(const char *name, int family)

Returns the font id for the given font name. If the name has not yet been used, the directory tries to initialize the font using specifications from the resources. The given family id is used for the new font if it is created and the resource does not specify a family id.


wxFontNameDirectory::GetAFMName

char * GetAFMName(int fontId, int weight, int style)

Returns the AFM (Adobe Font Metric) filename for the font, with the path or extension.


wxFontNameDirectory::GetFamily

int GetFamily(int fontId)

Returns the family for the given font id.


wxFontNameDirectory::GetFontId

int GetFontId(const char *name)

Get the existing font id corresponding to the font name, or 0 if the name has not been initialized previously.


wxFontNameDirectory::GetFontName

char * GetFontName(int fontId)

Returns the font name for the given font id.


wxFontNameDirectory::GetNewFontId

int GetNewFontId(void)

Generates a new font id for direct initialization of a font with Initialize.


wxFontNameDirectory::GetPostScriptName

char * GetPostScriptName(int fontId, int weight, int style)

Returns the real PostScript name for the font.


wxFontNameDirectory::GetScreenName

char * GetScreenName(int fontId, int weight, int style)

Returns the platform-specific screen name for the font.


wxFontNameDirectory::Initialize

void Initialize(int fontId, int family, const char *name)

Initializes sets up a new font with the given font id, default family id and font name. Resource specifications are read using this name.