"It was an honest mistake -- I'm not running NT4; I'm just in Hong Kong!"

by Michael S. Kaplan, published on 2011/09/13 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2011/09/13/10209739.aspx


This blog you are reading right now is not about Windows 8.

It is also not about //build/.

Though it is about a bug that could repro there too, under some circumstances....

Some of you long-time readers may recall back in early 2006 when I wrote about Getting all of the localized names of a font, or almost a year later, when I wrote about Getting all of the localized names of a font[.NET].

Basically these blogs cover the support that Windows and .Net have for the various language specific entries in East Asian TrueType and OpenType fonts, contained in name (the Naming Table).

You know, the "feature" I mentioned in East Asian Font Names.... so long ago,

Now in theory none of this should matter.

Since (as I mentioned in East Asian Font Names....) both the English and localized names are registered in Windows, in Win2000 and later.

In fact, any time I am running on English, the Chinese - Taiwan OS, or the Chinese - Taiwan MUI Language Pack, either PMingLiU or 新細明體 can be used, and either will work.

However, do you remember in East Asian Font Names.... when I said

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. :-)

?

Well, it turns out that advice is still needed, sometimes.

It is still needed when you are using the Chinese - Hong Kong OS.

Or the MUI Language Pack.

In both of those cases, only one of the two font names will work.

At this point, you might be thinking "big deal, Michael!" since it would kind of make a weird kind of sense if (for example) when you ran on Turkish or Tajik or Tamil that for some reason only the English name worked.

I mean, it would hardly be great, taking us back to NT4.

But we lived through it once; we could live through it again.

Unfortunately, that isn't what's going on.

As it turns out, when running on Chinese - Hong Kong (OS or MUI Language Pack), the English name doesn't work -- only the localized name does!

Clearly, this is a bug.

Maybe it's in Fontsetup.inf, whose tortuous logic only gets more complicated for Hong Kong.

Maybe it's in the code behind AddFontResourceEx, that registers the names when the WindowStation starts.

Or maybe it's somewhere else entirely.

Now this whole area of code has one special feature.

It's fragile and no one wants to touch it because they don't want to break anything.

Though I hope someone takes a look.

I don't want to run NT4!


cheong00 on 13 Sep 2011 7:13 PM:

Perheps that's why I couldn't use WEFT to convert this font to .EOT file a few years ago?

Michael S. Kaplan on 13 Sep 2011 10:38 PM:

You have Hong Kong settings? How did failure manifest itself?

cheong00 on 13 Sep 2011 11:24 PM:

I remember that when try to fetch font from PMingLiU, I simply can't select the font.

The application (WEFT 3 I think) have menu item that enable user to auto-search fonts available, but it can't find the font there. When I use manual selection to choose the font, it simply terminate unexpectedly.

Michael S. Kaplan on 14 Sep 2011 12:26 AM:

That doesn't seem related -- perhaps that is more of a "I don't understand TTCs" type bug?

It is only related to this blog if it is specific to Hong Kong but doesn't repro for Taiwan, etc....

cheong00 on 14 Sep 2011 12:41 AM:

I don't know... I was using that a few years ago, changed a few companies during the period, and no longer required to work with that now.

I'd think it'd probably related to the "auto detection of available font list" part, though.


Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

go to newer or older post, or back to index or month or day