SetMapperFlags

2.x

  DWORD SetMapperFlags(hdc, fdwMatch)    
  HDC hdc; /* handle of device context */
  DWORD fdwMatch; /* mapper flag, */  

The SetMapperFlags function changes the method used by the font mapper when it converts a logical font to a physical font. An application can use SetMapperFlags to cause the font mapper to attempt to choose only a physical font that exactly matches the aspect ratio of the specified device.

Parameters

hdc

Identifies a device context.

fdwMatch

Specifies whether the font mapper attempts to match a font's aspect height and width to the device. When this value is ASPECT_FILTERING, the mapper selects only fonts whose x-aspect and y-aspect exactly match those of the specified device, and the remaining bits are ignored.

Return Value

The return value is the previous value of the font-mapper flag, if the function is successful.

Comments

An application that uses only raster fonts can use the SetMapperFlags function to ensure that the font selected by the font mapper is attractive and readable on the specified device. Applications that use scalable (TrueType) fonts typically do not use SetMapperFlags.

If no physical font has an aspect ratio that matches the specifications in the logical font, GDI chooses a new aspect ratio and selects a font that matches this new aspect ratio.