Device fonts, particularly printer fonts, usually are designed for a specific resolution, namely the resolution of the device on which they are to be used. By contrast, generic outline fonts are not device-specific. Generic image fonts are designed for a particular resolution value and, therefore, are really applicable only to devices with a matching resolution value.
The horizontal and vertical font resolution values for the device are returned by DevQueryCaps. The desired horizontal and vertical device resolution values in the font metrics of the font concerned are returned by GpiQueryFonts. Compare these the device and the desired resolution values only for an image font. If they are identical then this image font is designed for use with this device (for example, the point size in the font metrics will be accurate for this device). To select a font, do the following:
Before you define a logical font, determine the resolution of the current device by using DevQueryCaps with the CAPS_VERTICAL_FONT_RES and CAPS_HORIZONTAL_FONT_RES parameters.
Compare the values returned from this function with the xDeviceRes and yDeviceRes values in the font metrics of the available fonts. These two values contain the resolution of the device for which the font was designed. All measurements are in pels per inch. By comparing the font resolution with the device resolution, you can identify the image font best suited to the current device.