Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get English name of Asian fonts?

314 views
Skip to first unread message

Tao Wang

unread,
May 6, 2010, 9:55:00 PM5/6/10
to
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.

unread,
May 7, 2010, 3:53:25 AM5/7/10
to

> 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

0 new messages