OEM, ANSI, and Fonts

Windows has different fonts for displaying the ANSI and OEM character sets. When you first obtain a handle to a device context, one of the attributes in the device context is a font.

By default this is the SYSTEM_FONT or ”system font,“ which uses the ANSI character set. If you want to display characters from the OEM character set, you can select the OEM_FIXED_FONT (also called the ”terminal font“) in the device context by using the following code:

SelectObject (hdc, GetStockObject (OEM_FIXED_FONT)) ;

This is the only font in Windows guaranteed to support the OEM character set.