The InstallFont() function is used to install new fonts on a system
running the Pandora Engine. While it is possible for users to download new
font files and install them by hand, this is a process that is too difficult
for novices and is open to mistakes on the part of the user. By writing a
program that uses this function, the installation process can take place
automatically.
To install a new font, you need to know the font's name, files and its
category. A number of other details are optional. Calling this function
requires that you provide this information in a tag-list. The available
tags are listed in the following table:
TGF_NAME | The name of the font. |
TGF_FILES | A list of data files that make up the font structure must be specified here. If there is more than one data file, separate each file name with a comma. |
TGF_SUBDIRECTORY | You must provide a sub-directory, or 'category' that the font belongs to. For instance, if the font is a bitmap type then specify "Bitmap", if the font is in TrueType format then specify "TrueType". |
TGF_FIXEDSIZE | If the font data supports a restricted amount of point sizes, list them in this string. For instance, if the Font can be drawn in 8pt, 12pt and 20pt sizes, the string should be set to "8,12,20" |
TGF_RANGEDSIZE | If the font data supports a range of point sizes, list them in this string. For instance, if the Font supports any size between 8pt and 30pt and 50pt to 70pt then the string should be set to "8-30,50-70". |
Once this function is called, the data files will be copied into the
correct sub-directory and the font registration files will be updated to
reflect the presence of the new font. The font will be available immediately
thereafter and there is no need to reset the system to acknowledge the
presence of the font.
ERR_Okay | The font information was successfully installed. |
ERR_ExclusiveDenied | Access to the SystemFonts object was denied. |
ERR_Args | The Name, Files or SubDirectory tags were not specified. |
|