AllAPI Network - The KPD-Team

Allapi Network

 API List

API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
This Site
 Search Engine
 Contact Form

Donate to


The AddFontResource function adds the font resource from the specified file to the system font table. The font can subsequently be used for text output by any Win32-based application.

Declare Function AddFontResource Lib "gdi32" Alias "AddFontResourceA" (ByVal lpFileName As String) As Long

Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later


Parameter Information
[in] Pointer to a null-terminated character string that contains a valid font file name. This parameter can specify any of the following files.
Font resource file.
Raw bitmap font file.
Raw TrueType file.
Windows 95/98 East Asian and Windows NT: TrueType font collection.
TrueType resource file.
PostScript OpenType font.
multiple master Type1 font resource file. It must be used with .pfm and .pfb files.
Type 1 font bits file. It is used with a .pfm file.
Type 1 font metrics file. It is used with a .pfb file.

Windows 2000: To add a font whose information comes from several resource files, have lpszFileName point to a string with the file names separated by a | --for example, abcxxxxx.pfm | abcxxxxx.pfb.

Return Values
If the function succeeds, the return value specifies the number of fonts added.

If the function fails, the return value is zero. To get extended error information, call GetLastError.


Related Functions



Copyright © 1998-2007, The Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at