Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How does Windows 7 map Chinese .TTF font files into the native Chinese font name? If no such info is in the actual TrueType font file?

For example: Chinese version of Windows 7 contains msyh.ttf file which is a regular Microsoft YaHei font.

Any font viewer will show this exact font name - exept Windows 7 itself. GDI font enumeration routine returns '微软雅黑' as a name.

Where does the actual mapping happen? Anyone know the mapping scheme? Thank you.

share|improve this question

migrated from stackoverflow.com Apr 14 '11 at 1:19

This question came from our site for professional and enthusiast programmers.

2 Answers 2

True type fonts have their names embedded inside.

Try this link for more info.

http://www.codeproject.com/KB/GDI/fontnamefromfile.aspx

share|improve this answer
    
Yes, the English name is embedded, but I need the native (Chinese characters) name. Do you know where this mapping happens? –  Alex Apr 13 '11 at 23:58
    
There are a number of names within the TTF file, Check out the naming table. Try this link TTF Naming Table –  Jason Apr 14 '11 at 0:13

As the person above said: "True type fonts have their names embedded inside".

I'm making my own custom font file (but I'm not a font developer), and I also able to put the names in different languages in the font file, and it (the situation) must be the same for the real font developers.

For me, I make my own font with CJK support (with differentiation for C/J/K) as a lot of program can load only one font at one time and I can't set four different fonts (for Latins, Chinese, Japanese, Korean) to load at the same time in those programs.

I can view all the names in different languages via my font editor itself.

For example, my font Hidayat's Custom Font CJK .
It will appear as Hidayat's Custom Font CJK in US/UK English Windows, appear as 喜达亚CJK字体 in Singaporean/PRC Chinese Windows, appear as やつこ自分のCJK字体 in Japanese Windows and Font CJK Hidayat Sendiri in Malay Windows as I already defined those names in my font. And the font developer must have done the same thing that 微软雅黑 appeared in Chinese ver. Windows. (微软wēi ruǎn means Microsoft->微wēi is "very tiny" and 软ruǎn is "soft" and 雅黑yǎ hēi is the font name)

Well, I've said that I'm using a font editor to view the names in the "naming" part.
Look at these (my font used as the examples, IDon'tWant to violate laws!):
Naming (US English): https://puu.sh/2GaIs.png
Naming (PRC Chinese): http://puu.sh/2GaRY.png
Naming (Japanese): http://puu.sh/2GaUz.png
Naming (Singaporean Chinese): http://puu.sh/2GaXQ.png
Naming (UK English): http://puu.sh/2GaZB.png
Naming (Malaysian Malay): http://puu.sh/2Gb0F.png

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.