The parameters passed to the function identify the name and attributes of
the required font. The graphics engine selects a font from the list of available
fonts that provides the best match for the font attributes addressed by
pAttrs.
The selection is made in one of two ways:
- If the lMatch attribute is nonzero, the calling program
has already determined (from a call to GreQueryFonts) which font it requires.
In this case, the graphics engine selects the font identified by the lMatch
and szFaceName attributes (or, if szFaceName is not specified, lMatch alone).
- If lMatch is 0 or a suitable match could not be found,
the system examines the other fields in the attributes structure and selects
the font that gives the best match.
If no match is found, the default font is used. When assigned, the system
will not change the relationship of a specific lcid to a specific font.
The interaction between fonts and character attributes depends on the state
of the FATTRS_FONTUSE_TRANSFORMABLE flag in the font attributes structure.
When this flag is set:
- The size of the characters is determined by the values
of the character attributes at the time that the characters are drawn.
- The characters are positioned, rotated, and sheared,
as required.
- No checking is done.
- Any transformation is performed by mapping the box
defined by the FONTMETRICS parameters, xMaxCharInc and yEmHeight, to the
character box under the influence of character angle and shear.
When the FATTRS_FONTUSE_TRANSFORMABLE flag is not set, the lAveCharWidth
and lBaselineExt parameters in the font attributes structure define the
size of the font to be used. The character box attribute has no effect.
Transformable fonts cannot be used in Character Modes 1 and 2. Nontransformable
fonts cannot be used in Character Mode 3. If the font is not compatible
with the character mode, the engine raises an error when the presentation
driver attempts to draw characters. The characteristics of the character
modes are:
CM_MODE1
The position of characters after the first
character is determined by the font metrics information. Character box,
angle, shear, extra, break extra, and spacing are ignored.
CM_MODE2
The position of characters is determined by the
font metrics information and the character attributes. Characters are not
scaled, rotated, or sheared.
CM_MODE3
The
position of characters is determined by the font metrics information and
all character attributes. Characters can be scaled, rotated, and sheared.
Positioning is performed by using the character reference point defined
within the font. When characters that are not hollow are drawn using an
outline font, they are filled using the character foreground color and mix.
[Back: GreCreateLogicalFont - Parameters]
[Next: GreCreateLogicalFont - Topics]