The alternative to selecting a specific font is to set the match value to 0. To have the Presentation Manager programming interface select the closest-matching font available, do the following:
Filling in the FATTRS Structure
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³If using a match number ³If not using a match number ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Set the match number to the ³Set the match number to zero. ³ ³required FONTMETRICS value. ³ ³ ³The FONTMETRICS value is the ³If your font is an image font:³ ³value in the FONTMETRICS ³ ³ ³structure for the required ³Set the maximum baseline ³ ³font returned by GpiQueryFonts³extent to the required ³ ³. ³FONTMETRICS value. ³ ³ ³ ³ ³Set the maximum baseline ³Set the average character ³ ³extent to zero. ³width to the required ³ ³ ³FONTMETRICS value. ³ ³Set the average character ³ ³ ³width to zero. ³ ³ ³ ³ ³ ³Note: A negative lMatch is ³ ³ ³only unique for a device. A ³ ³ ³positive lMatch is only unique³ ³ ³on a particular system at a ³ ³ ³particular time. ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Also observe the rules concerning the font-use indicator that are listed in the following table.
Font-Use Indicator Considerations
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³If you have not set the ³If you have set the ³ ³FATTR_FONTUSE_OUTLINE ³FATTR_FONTUSE_OUTLINE ³ ³indicator: ³indicator: ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³PM looks for an image font ³PM looks for a suitable ³ ³that has the required ³outline font whose selection ³ ³selection indicators and whose³indicators match those you ³ ³maximum baseline extent and ³have specified. ³ ³average character width match ³ ³ ³those you have specified. ³If no suitable outline font is³ ³ ³found, the default font is ³ ³If no suitable image font is ³used. No attempt is made to ³ ³found, PM looks for an outline³substitute an image font. ³ ³font with the required face ³ ³ ³name and selection indicators.³ ³ ³ ³ ³ ³If no suitable outline font is³ ³ ³found, the default font is ³ ³ ³made available to you. ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Outline fonts are affected by the current character attributes (for example, character box, shear, and angle). Because an outline font might be made available to you, even when you requested an image font, call GpiQueryFontMetrics to determine whether the font is an image font or an outline font. GpiQueryFontMetrics returns the metrics of the current logical font in world coordinates.
The setting of the definition indicators in the FONTMETRICS structure tell you whether the font is either an image or outline font, or a device or generic font. If the font is an outline font, specify values for the character attributes before using the font. Outline fonts are unaffected by the maximum baseline extent and average character width values specified in GpiCreateLogFont.
If the default font provided is an image font, and you also have specified FATTR_FONTUSE_TRANSFORMABLE, any attempt to draw graphics characters in CM_MODE3 raises an error condition. This is an exception to the general rule that a FATTR_FONTUSE_TRANSFORMABLE font must be used in CM_MODE3 only.