2.14 Font Functions

Font functions select, create, remove, and retrieve information about fonts. A font is a subset of a particular typeface, which is a set of characters that share a similar fundamental design. Following are the font functions:

Function Description

AddFontResource Adds a font resource in the specified file to the system font table.
CreateFont Creates a logical font that has the specified characteristics.
CreateFontIndirect Creates a logical font that has the specified characteristics.
CreateScalableFontResource Creates a font resource file containing the font directory information and the font module name for a specified scalable font file.
EnumFontFamilies Enumerates the fonts in a specified font family that are available on a given device. (Supersedes the EnumFonts function.)
EnumFonts Enumerates the fonts available on a given device. Superseded by the EnumFontFamilies function.
GetAspectRatioFilter Retrieves the setting for the current aspect-ratio filter.
GetAspectRatioFilterEx Retrieves current aspect-ratio filter.
GetCharABCWidths Retrieves the widths of consecutive characters in a specified range from the current TrueType font.
GetCharWidth Retrieves the widths of individual characters in a range of consecutive characters from the current font.
GetFontData Retrieves font metric data from a TrueType font file.
GetGlyphOutline Retrieves the outline curve or bitmap for an outline character in the current font.
GetOutlineTextMetrics Fills a buffer with metrics for the selected TrueType font.
GetRasterizerCaps Retrieves flags indicating whether TrueType fonts are installed in the system.
GetTextFace Copies the current font name to a buffer.
GetTextMetrics Fills a buffer with metrics for the selected font.
RemoveFontResource Removes a font resource from the font table.
SetMapperFlags Alters the algorithm the font mapper uses.

For information about using font functions in an application, see the Microsoft Windows Guide to Programming.