FATTR_TYPE_MBCS Font for mixed single- and double-byte
code pages.
FATTR_TYPE_DBCS Font for double-byte code pages.
FATTR_TYPE_ANTIALIASED Antialiased font required. Only valid if
supported by the device driver.
ΓòÉΓòÉΓòÉ <hidden> FATTRS Field - fsFontUse ΓòÉΓòÉΓòÉ
fsFontUse (USHORT)
Font-use indicators.
These flags indicate how the font is to be used. They affect presentation
speed and font quality.
FATTR_FONTUSE_NOMIX
Text is not mixed with graphics and can be
written without regard to any interaction
with graphics objects.
FATTR_FONTUSE_OUTLINE
Select an outline (vector) font. The font
characters can be used as part of a path
definition. If this flag is not set, an
outline font might or might not be selected.
If an outline font is selected, however,
character widths are rounded to an integral
number of pels.
FATTR_FONTUSE_TRANSFORMABLE
Characters can be transformed (for example,
scaled, rotated, or sheared).
ΓòÉΓòÉΓòÉ 1.20. FIXED ΓòÉΓòÉΓòÉ
Signed-integer fraction (16:16). This can be treated as a LONG where the value
has been multiplied by 65 536.
typedef LONG FIXED;
ΓòÉΓòÉΓòÉ 1.21. FFDESCS ΓòÉΓòÉΓòÉ
Font-file descriptor.
typedef CHAR FFDESCS[2][FACESIZE];
ΓòÉΓòÉΓòÉ 1.22. FFDESCS2 ΓòÉΓòÉΓòÉ
Font-file descriptor.
typedef struct _FFDESCS2 {
ULONG cbLength; /* Structure length. */
ULONG cbFacenameOffset; /* Offset of Facename in the structure. */
BYTE abFamilyName[1]; /* Family name. */
} FFDESCS2;
typedef FFDESCS2 *PFFDESC2;
ΓòÉΓòÉΓòÉ <hidden> FFDESCS2 Field - cbLength ΓòÉΓòÉΓòÉ
cbLength (ULONG)
Structure length.
cbLength is the overall length of the FFDESCS2 structure. It is always
rounded up to a multiple of four.
ΓòÉΓòÉΓòÉ <hidden> FFDESCS2 Field - cbFacenameOffset ΓòÉΓòÉΓòÉ
cbFacenameOffset (ULONG)
Offset of Facename in the structure.
The facename is a null terminated string. It starts at cbFacenameOffset
bytes offset into FFDESCS2.
ΓòÉΓòÉΓòÉ <hidden> FFDESCS2 Field - abFamilyName[1] ΓòÉΓòÉΓòÉ
abFamilyName[1] (BYTE)
Family name.
abFamilyName is a null terminated string.
ΓòÉΓòÉΓòÉ 1.23. FOCAMETRICS ΓòÉΓòÉΓòÉ
FOCAMETRICS data structure.
This structure is returned to applications on the GPIQueryFonts and
GPIQueryFontMetrics calls and conveys information from the font creator to the
application.
typedef struct _FOCAMETRICS {
ULONG ulIdentity; /* Structure identity code. */
ULONG ulSize; /* Structure size in bytes. */
CHAR szFamilyname[32]; /* Font family name. */
CHAR szFacename[32]; /* Face name. The typeface name defines the particular font; for example, "Times New Roman Bold Italic."** This string is null terminated and is, therefore, limited to 32 characters in length. */
SHORT usRegistryId; /* Registry identifier. */
USHORT usCodePage; /* Code page supported by the font. */
SHORT yEmHeight; /* Em height. */
SHORT yXHeight; /* X height. */
SHORT yMaxAscender; /* Maximum ascender. */
SHORT yMaxDescender; /* Maximum descender. */
SHORT yLowerCaseAscent; /* Lowercase ascent. */
SHORT yLowerCaseDescent; /* Lowercase descent. */
SHORT yInternalLeading; /* Internal leading. */
SHORT yExternalLeading; /* External leading. */
SHORT xAveCharWidth; /* Average character width. */
SHORT xMaxCharInc; /* Maximum character increment. */
SHORT xEmInc; /* Em increment. */
SHORT yMaxBaselineExt; /* Maximum baseline extent. */
SHORT sCharSlope; /* Character slope. */
SHORT sInlineDir; /* Inline direction. */
SHORT sCharRot; /* Character rotation. */
USHORT usWeightClass; /* Weight class. */
USHORT usWidthClass; /* Width class. */
SHORT xDeviceRes; /* X-device resolution. */
SHORT yDeviceRes; /* Y-device resolution. */
SHORT usFirstChar; /* First character. */
SHORT usLastChar; /* Last character. */
SHORT usDefaultChar; /* Default character. */
SHORT usBreakChar; /* Break character. */
SHORT usNominalPointSize; /* Nominal point size. */
SHORT usMinimumPointSize; /* Minimum point size. */
SHORT usMaximumPointSize; /* Maximum point size. */
SHORT usTypeFlags; /* Type indicators. */
SHORT fsDefn; /* Definition indicators. */
SHORT fsSelectionFlags; /* Selection indicators. */
SHORT fsCapabilities; /* Capabilities. */
SHORT ySubscriptXSize; /* Subscript X-size. */
SHORT ySubscriptYSize; /* Subscript Y-size. */
SHORT ySubscriptXOffset; /* Subscript X-offset. */
SHORT ySubscriptYOffset; /* Subscript Y-offset. */
SHORT ySuperscriptXSize; /* Superscript X-size. */
SHORT ySuperscriptYSize; /* Superscript Y-size. */
SHORT ySuperscriptXOffset; /* Superscript X-offset. */
SHORT ySuperscriptYOffset; /* Superscript Y-offset. */
SHORT yUnderscoreSize; /* Underscore size. */
SHORT yUnderscorePosition; /* Underscore position. */
SHORT yStrikeoutSize; /* Strikeout size. */
SHORT yStrikeoutPosition; /* Strikeout position. */
SHORT usKerningPairs; /* Kerning pairs. */
SHORT sFamilyClass; /* Font family design classification. */
PSZ pszDeviceNameOffset; /* Address where device name is stored. */
} FOCAMETRICS;
typedef FOCAMETRICS *PFOCAMETRICS;
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ulIdentity ΓòÉΓòÉΓòÉ
ulIdentity (ULONG)
Structure identity code.
Value must be one (1). This field is not part of the FONTMETRICS structure.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - ulSize ΓòÉΓòÉΓòÉ
ulSize (ULONG)
Structure size in bytes.
This must be set to the size of the FOCAMETRICS structure. This field is
not part of the FONTMETRICS structure.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - szFamilyname[32] ΓòÉΓòÉΓòÉ
szFamilyname[32] (CHAR)
Font family name.
The family name defines the basic appearance of the font; for example,
"Times New Roman."** This string is null terminated and is, therefore,
limited to 32 characters in length.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - szFacename[32] ΓòÉΓòÉΓòÉ
szFacename[32] (CHAR)
Face name. The typeface name defines the particular font; for example,
"Times New Roman Bold Italic."** This string is null terminated and is,
therefore, limited to 32 characters in length.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usRegistryId ΓòÉΓòÉΓòÉ
usRegistryId (SHORT)
Registry identifier.
The IBM registered number (or zero).
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usCodePage ΓòÉΓòÉΓòÉ
usCodePage (USHORT)
Code page supported by the font.
Defines the registered code page supported by the font. A value of zero (0)
implies that the font may be used with any of the code pages supported by
OS/2.
When a font contains special symbols for which there is no registered code
page, then code page 65400 is used.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yEmHeight ΓòÉΓòÉΓòÉ
yEmHeight (SHORT)
Em height.
The height of the Em square in world coordinate units. This height
corresponds to the point size for the font.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yXHeight ΓòÉΓòÉΓòÉ
yXHeight (SHORT)
X height.
The nominal height above the baseline for lowercase characters (ignoring
ascenders), in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yMaxAscender ΓòÉΓòÉΓòÉ
yMaxAscender (SHORT)
Maximum ascender.
The maximum height above the baseline reached by any part of any symbol in
the font, in world coordinate units. This field may exceed yEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yMaxDescender ΓòÉΓòÉΓòÉ
yMaxDescender (SHORT)
Maximum descender.
The maximum depth below the baseline reached by any part of any symbol in
the font, in world coordinate units. This field may exceed yEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yLowerCaseAscent ΓòÉΓòÉΓòÉ
yLowerCaseAscent (SHORT)
Lowercase ascent.
The maximum height above the baseline reached by any part of any lowercase
(Latin unaccented ' a ' through ' z ') symbol in the font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yLowerCaseDescent ΓòÉΓòÉΓòÉ
yLowerCaseDescent (SHORT)
Lowercase descent.
The maximum depth below the baseline reached by any part of any lowercase
(Latin unaccented ' a ' through ' z ') symbol in the font, in world
coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yInternalLeading ΓòÉΓòÉΓòÉ
yInternalLeading (SHORT)
Internal leading.
The amount of space which, when subtracted from yMaxAscender, gives a
measure of the distance above the baseline that characters extend. This
measure is font-design dependent, but glyph-set independent. Therefore,
this calculation approximates the visual top to a row of characters without
actually looking at the characters in the row.
It is recommended that applications use this field to position the first
line of a block of text by subtracting yInternalLeading from yMaxAscender.
Then position the baseline that distance below the preceding information
(text or graphic element).
Note: This use does not guarantee that characters will not overwrite those
above them; it does give a font designer's view of where to place
the text. Collision should be tested for and additional space
allocated if necessary.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yExternalLeading ΓòÉΓòÉΓòÉ
yExternalLeading (SHORT)
External leading.
The amount of guaranteed white space advised by the font designer to appear
between adjacent rows of text. This value may be zero (0).
Note: The fonts built into Presentation Manager have zero (0) in this
field.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - xAveCharWidth ΓòÉΓòÉΓòÉ
xAveCharWidth (SHORT)
Average character width.
This is determined by multiplying the width of each lowercase character by
a constant, adding the products, and then dividing by 1000. The letters,
plus their constants, are listed below:
Letter Constant
a 64
b 14
c 27
d 35
e 100
f 20
g 14
h 42
i 63
j 3
k 6
l 35
m 20
n 56
o 56
p 17
q 4
r 49
s 56
t 71
u 31
v 10
w 18
x 3
y 18
z 2
space 166
Note: For fixed pitch fonts, this value will be the same as
the (A width + B width + C width) escapement of each
character.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - xMaxCharInc ΓòÉΓòÉΓòÉ
xMaxCharInc (SHORT)
Maximum character increment.
The maximum character increment for the font, in world coordinate units.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - xEmInc ΓòÉΓòÉΓòÉ
xEmInc (SHORT)
Em increment.
The width of the Em square in world coordinate units. This width
corresponds to the point size of the font. When the horizontal device
resolution equals the vertical device resolution, width is equal to the em
height.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - yMaxBaselineExt ΓòÉΓòÉΓòÉ
yMaxBaselineExt (SHORT)
Maximum baseline extent.
The maximum vertical space occupied by the font, in world coordinate units.
This space is the sum of yMaxAscender and yMaxDescender if both are
positive. It is also the sum of yInternalLeading and yEmHeight.
One possible line spacing can be computed by adding yMaxBaselineExt to
yInternalLeading. Such a line spacing, however, would be dependent on the
glyph set included in the font. If a new version of the font is made
available with new glyphs, then it is possible that this value will change
because one of the new glyphs has gone above the previous yMaxAscender or
below the previous yMaxDescender. More sophisticated applications will base
their line spacing on the point size (yEmHeight) of the font, which is an
invariant of the font, multiplied by some factor (for example, 120%), plus
any external leading.
yMaxBaselineExt may exceed yEmHeight.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - sCharSlope ΓòÉΓòÉΓòÉ
sCharSlope (SHORT)
Character slope.
Defines the nominal slope of the characters of a font. The slope is defined
in degrees, increasing clockwise from the vertical. An italic font is an
example of a font with a nonzero slope.
Note: The units for this metric are degrees and minutes, encoded as shown
in the following example.
180 degrees 59 minutes would be represented as:
Γöé < byte 1 > Γöé < byte 2 > Γöé
Γöé Γöé < Minutes > Γöé < Degrees > Γöé
Γöé0Γöé1 1 1 0 1 1 Γöé0 1 0 1 1 0 1 0 0Γöé
Γöé 59 min Γöé 180 degrees Γöé
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - sInlineDir ΓòÉΓòÉΓòÉ
sInlineDir (SHORT)
Inline direction.
The direction in which the characters in the font are designed for viewing.
Shown in degrees, increasing clockwise from the horizontal (left-to-right).
Characters are added to a line of text in the inline direction.
Note: The units for this metric are degrees and minutes, encoded as shown
in sCharSlope.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - sCharRot ΓòÉΓòÉΓòÉ
sCharRot (SHORT)
Character rotation.
The rotation of the character glyphs with respect to the baseline, the
angle increasing counterclockwise. This is the angle assigned by the font
designer.
Note: The units for this metric are degrees and minutes, encoded as shown
in sCharSlope.
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usWeightClass ΓòÉΓòÉΓòÉ
usWeightClass (USHORT)
Weight class.
Indicates the visual weight (thickness of strokes) of the characters in the
font:
Value Description
1000 Ultra-light
2000 Extra-light
3000 Light
4000 Semi-light
5000 Medium (normal)
6000 Semi-bold
7000 Bold
8000 Extra-bold
9000 Ultra-bold
ΓòÉΓòÉΓòÉ <hidden> FOCAMETRICS Field - usWidthClass ΓòÉΓòÉΓòÉ
usWidthClass (USHORT)
Width class.
Indicates the relative aspect ratio of the font characters in relation to