I created a font which contains 300 + characters (some of them are ASCII (<126) characters and some of them are ASCII characters greater then 128. The problem is, I could not display some of these character on some computers. In WordPad I press Alt + 137 to input character and select my font, no problem. But after I installed some language pack (e,g, CJK language file of windows XP), the ASCII 137 character is now empty.
So my question is, how to choose characters in my font so that I can use it under different computers (with different language pack installed)
You should not map glyphs to these non-printable character codes:
$0000 - $001F
$007F - $009F
Windows ‘uses’ those mappings internally through so called codepages. When you do map glyphs to those codes, you might see unpredictable and incompatible results between Windows versions and even between different localisations of the same Windows version.
Windows 95, 98 and ME use the Windows character set. Windows NT, 2000, XP and 2003 use Unicode internally but also accept the Windows character set. The Windows character set exists in different variations; defined as codepages. More information about Windows codepages:
http://www.microsoft.com/globaldev/reference/WinCP.mspx
About American Standard Code for Information Interchange (ASCII):
- ASCII contains 128 characters. See http://www.asciitable.com/
There are only 95 printing characters and they should all be visible (except for the space character) unless the font has invalid mappings.
The printing characters, starting with a space:
!"#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
abcdefghijklmnopqrstuvwxyz{|}~
A very extensive tutorial on character code issues from Jukka “Yucca” Korpela:
http://www.cs.tut.fi/~jkorpela/chars.html
Finally to answer your question: to be compatible with Windows 95, 98 and ME only use the printable characters from the ASCII character set. When you only focus on Windows NT, 2000, XP, 2003 and future releases of Windows, you can use Unicode character mappings.