Creates, if possible, a Fixed font having specified features, by looking up a corresponding font file. These fonts are deemed lightweight compared to Truetype fonts.
characterWidth | the desired width of a character. | |
characterHeight | the desired height of a character. | |
renderingStyle | the desired rendering style, which can be only one of the listed rendering styles (no combination of attributes allowed). | |
convertToDisplay | tells whether a returned or cached rendering should have already been converted to display. Useful for classical 2D rendering, useless for OpenGL since surfaces will have to be converted nonetheless. | |
cacheSettings | determines which renderings should be cached. The recommended - and default - setting is 'GlyphCached', since with fixed fonts words can be easily drawn from prerendered glyphs. | |
cachePolicy | determines how the cache should behave regarding renderings being put in cache (store everything, enforce a maximum size taken in memory, etc.) | |
quota | Should an upper-bound to the memory size of cached renderings apply (depending on the chosen cache policy), determines its actual value. If a null (0) quota is passed, then the default value of the quota for the selected cache settings will be chosen. For example, if cacheSettings is 'WordCached' and cachePolicy is 'DropLessRequestedFirst' (this policy uses a quota), and if a null quota is specified, then the actual quota being used will be 'DefaultWordCachedQuota'. |
There are 21 most common fixed fonts: (descriptions must be read as: 'width x height: available styles', styles cannot be combined):
10x20: Normal
Rendering styles encoding is:
The filename of a font file describes the font, its form is: 'width'x'height'[rendering style]'.fnt'.
' is a normal 10x20 font, whereas '8x13B.fnt' is a 8x13 bold font and '8x13O.fnt' is font without bold but with italic. Rendering style mixing (ex: 'BO') is not allowed, a font has at most one rendering style.
FontException | if no corresponding font file could be found, or if cache setting is not known, etc. |
The font file will be searched from the fixed font locator first and, on failure, from the overall font locator.