This adds a font (specified by pathname) into the MUSHclient application space. It can then be used by world windows for output or command window fonts.
Any number of extra fonts can be added per world. (This feature added in version 4.93 of MUSHclient. Prior to version 4.93 you could only add one extra font at a time).
The intention here is for specialized fonts (like mapping fonts) to be made available without having to add extra font files to the Windows directory.
This is only supported on Windows 2000 or later (eg. Windows XP, Vista). It is not supported under Windows 95/98/ME. Use GetInfo (265) through to GetInfo (268) to find which version of Windows you are running under. (Basically GetInfo (265) needs to return 5 or higher).
The file name can specify any of the following files.
.fon Font resource file.
.fnt Raw bitmap font file.
.ttf Raw TrueType file.
.ttc East Asian Windows: TrueType font collection.
.fot TrueType resource file.
.otf PostScript OpenType font.
.mmm multiple master Type1 font resource file.
It must be used with .pfm and .pfb files.
.pfb Type 1 font bits file.
It is used with a .pfm file.
.pfm Type 1 font metrics file.
It is used with a .pfb file.
To add a font whose information comes from several resource files, point lpszFileName to a string with the file names separated by a | --for example, abcxxxxx.pfm | abcxxxxx.pfb.
Note: Available in version 4.32 onwards.
VBscript example
AddFont "myextrafont.ttf"
Lua example
AddFont ("myextrafont.ttf")
Returns
eBadParameter - empty file name given
eNoSuchCommand - not supported on your version of Windows
eFileNotFound - file not found, or Windows rejected it as a font file
eOK - added OK