_registerfonts

Description

Initializes the fonts graphics system.

#include <graph.h>

short __far _registerfonts( const char __far *pathname );

pathname Path name specifying .FON files to be registered  

Remarks

The _registerfonts function initializes the fonts graphics system. Font files must be registered with the _registerfonts function before any other font-related library function (_getgtextextent, _outgtext, _setfont, _unregisterfonts) can be used.

The _registerfonts function reads the specified files and loads font header information into memory. Each font header takes up about 140 bytes of memory.

The pathname argument is the path specification and filename of valid .FON files. The pathname can contain standard DOS wildcards.

The font functions affect only the output from the font output function _outgtext; no other run-time output functions are affected by font usage.

Return Value

The _registerfonts function returns a positive value which indicates the number of fonts successfully registered. A negative return value indicates failure. The following negative values may be returned:

Value Meaning

–1 No such file or directory.
–2 One or more of the .FON files was not a valid, binary .FON file.
–3 One or more of the .FON files is damaged.

Compatibility

Standards:None

16-Bit:DOS

32-Bit:None

See Also

_getfontinfo, _getgtextextent, _grstatus, _outgtext, _setfont, _unregisterfonts

Example

See the example for _outgtext.