LoadFont% Function Action Loads the font information from the .FON files or memory for the specified registered fonts and returns the number of fonts actually loaded. Syntax LoadFont% ( fontspec$) Remarks The argument fontspec$ is a specification used to load one or more of the registered fonts. The specification for each font consists of one or more of the following. ----------------------------------------------------------------------------- Specification Description ---------------------------------------------------------------------------- n # Loads font number # in the list of currently registered fonts. t name Specifies the desired font name. (There must be a space between t and name.) s # Specifies point size #. When s is specified, only the fonts designed for the screen mode specified by m are used. h # Specifies pixel height # of a font. m # Specifies screen mode #. This is Specification Description ---------------------------------------------------------------------------- m # Specifies screen mode #. This is used for sizing fonts with s. The default is the current screen mode. b Selects the best fit based on the size specified in the s or h options. The specification b is ignored with vector fonts because they can be any size. ----------------------------------------------------------------------------- ---------------------------------------------------------------------------- f Loads only a single fixed-space font. p Loads only the first proportionally spaced font that registered. Any previously loaded fonts are removed from memory. To load more than one font, multiple specifications are needed. Multiple specifications are separated by slash characters, and blanks are ignored. If the specifications do not match a registered font or if an invalid font is specified, then font number one (n1) is used. The LoadFont% function loads the character-bit maps into the loaded fonts array. This array corresponds to the registered fonts array which stores the font-header information. Before you can use the LoadFont% function, you must use the RegisterFont% function. Note The total size of the font data should be less than or equal to 64K unless the -AH option is used when invoking QBX. The -AH option allows the use of larger arrays. For more information on selecting a particular loaded font, see the SelectFont procedure. Example The following example demonstrates the LoadFont% function. r% = RegisterFonts("tmsrb.fon")' r% should = 6 after call. l% = LoadFont("h8-h12-h24")' l% should = 3 after call. ' 3 fonts (8,12,24 pts) will be loaded and usable. SelectFont 2' The 12-point font is current. SetGTextColor 10' Color 10 is light green. textlen% = OutGText (1,1,"TmsRmn 12-point") END Note that to load fonts according to their order in the font file, l% would take the form. l% = LoadFont%("n1,n3,n6")' Load the first, third, and sixth fonts.