by Michael S. Kaplan, published on 2005/02/26 08:11 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/02/26/380867.aspx
TrueType fonts under Win32 support multiple names, stored as resources inside the font file. This name is then used to identify the font in code. That resource string, like all resources, is read according to the machine's language settings. As anyone who understands localization will realize, this is very bad since it means that the functionality is changing when the language does (this string is not only used for display, it is used for programmatic purposes as well!). The font should be made to either accept only one name worldwide, or all names worldwide.... not to accept a different name depending on the machine's locale.
Fortunately, very few languages have ever taken advantage of this "feature" of font files.
Unfortunately, most Asian fonts do take advantage of it.
Thankfully, Windows 2000, XP, and Server 2003 have fixed the problem to the point where they will accept either name. For prior versions of Windows, the only practical solution is to try one font, then if that attempt fails to try the other. Thus, the list. :-)
This table is provided to give you both the English name and the localized name -- the latter will work only on that specific locale, and the former will work on every locale but that specific one. Feel free to use this information in your own applications that need to use specific fonts for East Asian data on different locales, on downlevel platforms.
Note: The question marks that appear in the English list of font names below is intentional. Due to what can only be considered really bad design decisions, these fonts were given Asian names for non-Asian locales (and such characters always become question marks when the resource file is not a Unicode one. Oops!!!). The ones marked in red do not exist -- in other words the font has but one name, which in this case is a good thing....
English Name | Localized Name |
MS UI Gothic | (N/A) |
Arphic Gyokailenmentai Heavy JIS | AR行楷連綿体H |
Arphic Gyokailenmentai Light JIS | AR行楷連綿体L |
HG??????M-PRO | HG丸ゴシックM-PRO |
HG????-PRO | HG正楷書体-PRO |
MS PR2???? | MS PR2ゴシック |
MS PR???? | MS PRゴシック |
HG?????E-PRO | HGゴシックE-PRO |
HG???? | HG正楷書体 |
MS PGothic | MS Pゴシック |
MS PMincho | MS P明朝 |
MS Gothic | MS ゴシック |
MS Mincho | MS 明朝 |
English Name | Localized Name |
GulimChe | 굴림체 |
BatangChe | 바탕체 |
DotumChe | 돋움체 |
GungsuhChe | 궁서체 |
Batang | 바탕 |
Gulim | 굴림 |
Dotum | 돋움 |
Gungsuh | 궁서 |
Ami R | 휴먼아미체 |
HYPMokGak-Bold | HY목각파임B |
HYShortSamul-Medium | HY얕은샘물M |
HYPost-Medium | HY엽서M |
Headline R | 휴먼둥근헤드라인 |
Pyunji R | 휴먼편지체 |
HYGothic-Extra | HY견고딕 |
HYSinMun-MyeongJo | HY신문명조 |
HYMyeongJo-Extra | HY견명조 |
HYTaJa-Medium | HY타자M |
Headline Sans R | 휴먼각진헤드라인 |
Yet R | 휴먼옛체 |
English Name | Localized Name |
SimSun | 宋体 |
SimHei | 黑体 |
FangSong_GB2312 | 仿宋_GB2312 |
KaiTi_GB2312 | 楷体_GB2312 |
YouYuan | 幼圆 |
STSong | 华文宋体 |
STZhongsong | 华文中宋 |
STKaiti | 华文楷体 |
STFangsong | 华文仿宋 |
STXihei | 华文细黑 |
STLiti | 华文隶书 |
STXingkai | 华文行楷 |
STXinwei | 华文新魏 |
STHupo | 华文琥珀 |
STCaiyun | 华文彩云 |
FZYaoTi | 方正姚体简体 |
FZShuTi | 方正舒体简体 |
NSimSun | 新宋体 |
LiSu | 隶书 |
MS Hei | (N/A) |
MS Song | (N/A) |
English Name | Localized Name |
PMingLiu | 新細明體 |
MingLiu | 細明體 |
DFLiHeiBold(P) | 華康儷粗黑 |
DFLiHeiBold | 華康新儷粗黑 |
DFKai-SB | 標楷體 |
# Rosyna on 26 Feb 2005 5:50 PM:
# Guy Smith-Ferrier on 16 Mar 2005 4:39 AM:
# Michael Kaplan on 16 Mar 2005 4:53 AM:
# Guy Smith-Ferrier on 17 Mar 2005 4:34 AM:
# Michael Kaplan on 17 Mar 2005 5:46 AM:
# Guy Smith-Ferrier on 17 Mar 2005 5:58 AM:
# Louis Z. D. on 14 Apr 2008 8:10 AM:
I'm working on an file import module, this module from the file transform text elements to our format. In the file there are text objects, of which font names are localized (witten with Japanese Unicode signes). In our application there is a font list and my goal is to determine font indices. The font list contains english font names.
My question is, is there any Win32 routine, which can determine the english font name by its localized name?
I see now two opportunities:
First: Hard code the previous assign list to our program.
Second: I've read about EnumFontFamilies which enumerates installed or supported font names. If the current system locale is equivalent with the locale of the font created, it returns the locale font name. Could it be possible to enumerate through the system locales and after set them enumerate the installed languages, and make a list in which the localized font name could be assigned to it's english correspondence? I think this wouldn't work satisfyable, what do you think?
Thank you, in advance
# Michael S. Kaplan on 14 Apr 2008 8:23 AM:
Actually, if you look here for unmanaged code and here for managed code, you'll see I have already answered the only way to get the names....
referenced by
2011/09/13 "It was an honest mistake -- I'm not running NT4; I'm just in Hong Kong!"
2010/03/30 A modest proposal
2008/10/28 Ready... set... Reboot Redux, part Deux!
2008/07/11 On installing and removing fonts, Part 4: The easiest part is the addition!
2006/10/21 Is Font.FontFamily localized?
2006/02/13 Getting all of the localized names of a font
2005/12/12 Ready... set... Reboot Redux