Discussion:
How to get English name of Asian fonts?
(too old to reply)
Tao Wang
2010-05-07 01:55:00 UTC
Permalink
Hi,

I'm using SystemParametersInfo() to get the default font in system.
However, the name I got is Localized Font Name, just as described in
MSDN:
http://msdn.microsoft.com/en-us/library/dd162620%28v=VS.85%29.aspx
======================
The fonts for many East Asian languages have two typeface names: an
English name and a localized name. EnumFonts, EnumFontFamilies, and
EnumFontFamiliesEx return the English typeface name if the system
locale does not match the language of the font.
======================

However, in my application, I need to get the English name in whatever
locale it is, rather than the localized name.

I'm awared the article : http://www.trigeminal.com/samples/font_choices.html

There is a list of sample, but how to get the English name of the
default font programmatically?

Thanks.
Mihai N.
2010-05-07 07:53:25 UTC
Permalink
Post by Tao Wang
There is a list of sample, but how to get the English name of the
default font programmatically?
You have to parse the 'name' table
(http://www.microsoft.com/typography/otspec/name.htm)
from the OpenType file.

Some code here:
http://blogs.msdn.com/michkap/archive/2007/01/22/1505420.aspx
http://blogs.msdn.com/michkap/archive/2006/02/13/530814.aspx
--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Continue reading on narkive:
Loading...