Customizing wince Fonts
Customizing fonts replacing Windows CE default Fonts
Customizing Fonts
You can change the appearance of your operating system (OS)
Customizing fonts. Windows CE allows you to replace fonts, specify a directory
From which the OS shocould load fonts, enable cleartype, enable antialiased
Fonts, enable linked fonts, change the font size for the help system, enable
End-user-defined-characters (EUDC), and enable line breaking for non-Roman
Fonts, such as your Asian-language characters.
For details, see the following topics:
Replacing Fonts
For some platforms or applications, you may be able to replace
Default Windows CE fonts with other fonts, including custom fonts. You can
Modify the Windows CE registry to replace default fonts, to replace fonts used
On a platform, and to replace raster fonts with TrueType fonts.
For details, see the following topics:
Replacing Windows CE default Fonts
Windows CE uses a default set of fonts that exist in Rom. You can replace
These fonts by modifying the Windows CE registry. The replacement font must
Exist in the/Windows directory on the target device.
The following table shows the locations of the fonts that you can replace
Through the Windows CE registry.
Font location registry key
System HKEY_LOCAL_MACHINE/system/GDI/sysfnt
Menu Bar HKEY_LOCAL_MACHINE/system/GWe/menu/barfnt
Pop-up menu HKEY_LOCAL_MACHINE/system/GWe/menu/popfnt
Out of memorywindow HKEY_LOCAL_MACHINE/system/GWe/oomfnt
To change a font in the Windows CE Registry
1. Modify your project. Reg project registry file by adding the registry keys listed
In the preceding table for the fonts you want to replace.
2. Under each registry key, add the following variables and values:
"Nm" = font-name
"Ht" = DWORD: Height
"It" = DWORD: italics-flag
"WT" = DWORD: Weight
"CS" = DWORD: character-Set
The following table describes each of these variables.
Variable description
Font-name font name, not including the extension. For example, to load
Arial font, Arial. TTF, use the following value for the font-name
Variable:
"Nm" = Arial
Height font height, in pixels.
Italics-flag set to 1 for italics; 0 for no italics.
Weight font weight, which can be one of the FW _ * values.
Character-set defines the character set, which can be one of the * _ charset
Values.
3. Rebuild your image.
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
Another name. The change affects all sizes and versions of a font.
The following example shows how to change the font from tahoma to
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 previusly used raster fonts
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"
Font linking Registry Settings
The following registry key links a base font to a link font. In this code example,
The Platform developer selected msgothic, a Japanese-specific font, when
Building the base platform. When searching for a character, the base font is
Searched first followed by the linked font. This enables you to support a larger
Variety of characters in a font without switching.
For more information about these settings, see Customizing fonts.
For a more information about these settings, see enabling linked fonts.
If locale = 0409
[HKEY_LOCAL_MACHINE/software/Microsoft/fontlink/systemlink]
"Arial" ="// Windows // msgothic. TTC, MSPgothic"
"Microsoft logo" ="// Windows // msgothic. TTC, MSPgothic"
"Times New Roman" ="// Windows // msgothic. TTC, MSGothic"
"Tahoma" ="// Windows // msgothic. TTC, MSPgothic"
"Courier New" ="// Windows // msgothic. TTC, MSPgothic"
"Symbol" ="// Windows // msgothic. TTC, MSGothic"
"Kino MT" = // windows // msgothic. TTC, MS Gothic
The following registry key describes the characters to skip in the base font in
Favor of the linked font.
[HKEY_LOCAL_MACHINE/software/Microsoft/fontlink/skiptable]
"Tahoma" = "005c, 00a5, 007e, 0391-03c9, 2026,2116, 221a, 25a0-25ff"
The following registry key sets the end-user-defined character (EUDC) font
The system.
[HKEY_CURRENT_USER/EUDC]
"Systemdefaulteudcfont" ="// Windows // EUDC. TTE"
Endif locale = 0409