typedef struct tagFMCONTROLS { /* fmct */
DWORD size;
DWORD penaltySumMax;
FMPENALTYSET fmpsMax;
FMWEIGHTSET fmws;
FMORDER fmorder;
} FMCONTROLS;
Specifies the control parameters of the font mapper. These parameters affect the form of the of information returned from EnumNearestFonts.
size
Specifies the size of this structure in bytes. For this version of Windows this must be set equal to sizeof(FMCONTROLS).
penaltySumMax
Specifies the maximum sum of all distances allowed for a font to be considered a good match.
fmpsMax
Specifies the maximum distance for each characteristic which a font can have to be called a good match. These distances are used to prune the search. Smaller distances tend to improve mapping speed.
fmws
Specifies the set of font weights to be used by EnumNearestFonts.
fmorder
This is an array of integers that specifies the order in which the EnumNearestFonts should consider various font attributes. It is recommended, but not required, that the font attributes with the highest associated weights be considered first.
Each process has defined a single FMCONTROLS structure. The members of this structure affect the function EnumNearestFonts.
EnumNearestFonts measures all the fonts available to a device context against a target font in the form of a logical font supplied by the application. Matches are considered either good or bad. A match is considered good if the distance between the physical font and the target is less than the set of cutoff values as defined by the FMPENALTYSET structure. If font is good then it will appear in the list returned by EnumNearestFonts.
The individual penalties (distances), are determined as follows. The font characteristic of the target and physical font are compared. A penalty is associated with their difference. Typically, the penalty is zero if the target and physical font are the same. Then this penalty is multiplied by the weight factor as specified by the application.
FMPENALTYSET FMWEIGHTSET FMORDER EnumNearestFonts