Metric Information Contained in Fonts

This section gives an explanation of how to set the fields of the FOCAMETRICS structure when developing:

The following structure contains the physical font metrics used when creating fonts. It is defined in the file \INCLUDE\PMFONT.H.

typedef struct _FOCAMETRICS {        ULONG   ulIdentity;
        ULONG   ulSize;
        CHAR    szFamilyname[32];
        CHAR    szFacename[32];
        SHORT   usRegistryId;
        SHORT   usCodePage;
        SHORT   yEmHeight;
        SHORT   yXHeight;
        SHORT   yMaxAscender;
        SHORT   yMaxDescender;
        SHORT   yLowerCaseAscent;
        SHORT   yLowerCaseDescent;
        SHORT   yInternalLeading;
        SHORT   yExternalLeading;
        SHORT   xAveCharWidth;
        SHORT   xMaxCharInc;
        SHORT   xEmInc;
        SHORT   yMaxBaselineExt;
        SHORT   sCharSlope;
        SHORT   sInlineDir;
        SHORT   sCharRot;
        USHORT  usWeightClass;
        USHORT  usWidthClass;
        SHORT   xDeviceRes;
        SHORT   yDeviceRes;
        SHORT   usFirstChar;
        SHORT   usLastChar;
        SHORT   usDefaultChar;
        SHORT   usBreakChar;
        SHORT   usNominalPointSize;
        SHORT   usMinimumPointSize;
        SHORT   usMaximumPointSize;
        SHORT   fsTypeFlags;
        SHORT   fsDefn;
        SHORT   fsSelectionFlags;
        SHORT   fsCapabilities;
        SHORT   ySubscriptXSize;
        SHORT   ySubscriptYSize;
        SHORT   ySubscriptXOffset;
        SHORT   ySubscriptYOffset;
        SHORT   ySuperscriptXSize;
        SHORT   ySuperscriptYSize;
        SHORT   ySuperscriptXOffset;
        SHORT   ySuperscriptYOffset;
        SHORT   yUnderscoreSize;
        SHORT   yUnderscorePosition;
        SHORT   yStrikeoutSize;
        SHORT   yStrikeoutPosition;
        SHORT   usKerningPairs;
        SHORT   sFamilyClass;
        PSZ     pszDeviceNameOffset;
} FOCAMETRICS;

Note: FOCAMETRICS is a parallel structure with FONTMETRICS as returned to applications in the GpiQueryFonts and GpiQueryFontMetrics function calls.

The FONTMETRICS fields are derived from FOCAMETRICS by the Presentation Manager graphics engine. Most values are passed though unchanged. The exceptions are: