Replacing Platform Fonts

There are two ways to replace platform fonts: font name aliasing and font fixing.

If you want to replace a font used on a platform, but still maintain compatibility with applications that use the existing font, use font name aliasing. This technique uses the HKEY_LOCAL_MACHINE\System\Gdi\FontAlias registry key to turn a request for a specified font name into a request for a font with another name. The change affects all sizes and versions of a font.

The following example shows how to change the font from Tahoma to a custom font called MyDisplayFont.

HKEY_LOCAL_MAHINE\SYSTEM\GDI\FontAlias
    "Tahoma"="MyDisplayFont"

Font fixing is similar to font name aliasing, but it applies only to a specific point size of the font. It also applies only to applications with a version number that is less than or equal to the current setting of the version registry key. This registry key specifies which version of an application is affected by font fixing.

Font fixing is commonly used for a device that previously used raster fonts but now uses TrueType fonts. The following example shows how to replace 13-point MS Sans Serif, the raster font, with 9-point Tahoma, the TrueType font.

HKEY_LOCAL_MACHINE\SYSTEM\GDI\V1\FontAlias
    "version"=DWORD:2000c
    "MS Sans Serif:-13"="Tahoma:-9"

See Also

Replacing Fonts | Fonts Implementation Considerations | Fonts

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.