Class: wxFont, wxFontDialog
A font is an object which determines the appearance of text, primarily when drawing text to a window or device context. A font is determined by the following parameters (not all of them have to be specified, of course):
|Point size||This is the standard way of referring to text size.|
|Family||Supported families are: wxDEFAULT, wxDECORATIVE, wxROMAN, wxSCRIPT, wxSWISS, wxMODERN. wxMODERN is a fixed pitch font; the others are either fixed or variable pitch.|
|Style||The value can be wxNORMAL, wxSLANT or wxITALIC.|
|Weight||The value can be wxNORMAL, wxLIGHT or wxBOLD.|
|Underlining||The value can be true or false.|
|Face name||An optional string specifying the actual typeface to be used. If NULL, a default typeface will chosen based on the family.|
|Encoding||The font encoding (see wxFONTENCODING_XXX constants and the font overview for more details)|
Specifying a family, rather than a specific typeface name, ensures a degree of portability across platforms because a suitable font will be chosen for the given font family, however it doesn't allow to choose a font precisely as the parameters above don't suffice, in general, to identify all the available fonts and this is where using the native font descriptions may be helpful - see below.
Under Windows, the face name can be one of the installed fonts on the user's system. Since the choice of fonts differs from system to system, either choose standard Windows fonts, or if allowing the user to specify a face name, store the family name with any file that might be transported to a different Windows machine or other platform.