7.8.1 Font-Directory Data

Font-directory data consists of a font count and one or more font directory entries.

7.8.1.1 Font Count

The font count is an integer that specifies the number of fonts in the resource. This value also corresponds to the number of font directories and font components.

7.8.1.2 Font Directory

The font directory is a collection of font metrics for a particular font. These metrics specify the point size for the font, aspect ratio, stroke width, and so on. The FontDirEntry structure has the following form:

struct FontDirEntry {
        WORD  fontOrdinal;
        WORD  dfVersion;
        DWORD dfSize;
        char  dfCopyright[60];
        WORD  dfType;
        WORD  dfPoints;
        WORD  dfVertRes;
        WORD  dfHorizRes;
        WORD  dfAscent;
        WORD  dfInternalLeading;
        WORD  dfExternalLeading;
        BYTE  dfItalic;
        BYTE  dfUnderline;
        BYTE  dfStrikeOut;
        WORD  dfWeight;
        BYTE  dfCharSet;
        WORD  dfPixWidth;
        WORD  dfPixHeight;
        BYTE  dfPitchAndFamily;
        WORD  dfAvgWidth;
        WORD  dfMaxWidth;
        BYTE  dfFirstChar;
        BYTE  dfLastChar;
        BYTE  dfDefaultChar;
        BYTE  dfBreakChar;
        WORD  dfWidthBytes;
        DWORD dfDevice;
        DWORD dfFace;
        DWORD dfReserved;
        char  szDeviceName[];
        char  szFaceName[];
};

For a full description of these members, see the TEXTMETRIC and LOGFONT structures in the Microsoft Windows Programmer's Reference, Volume 3.