You can often do better than [GDI] font linking

by Michael S. Kaplan, published on 2006/03/08 22:35 -05:00, original URI:

The other day, I was talking with a developer about a problem -- how to deal with a font linking choice and displaying some localized text based on it without requiring a reboot.

We talked through a bunch of options, realizing that all of them would require some core changes in GDI, and none of them were really all that feasible.

The truth is that I should have just started reading my blog a little bit more often, so I can remember to follow my own advice. :-)

As I point out in Font substitution and linking #3, font linking is a useful feature if you want to not specify a font and instead rely on the system locale's prefence for font linking. But in a localized dialog, one can simply let the localizer choose the right font and you will see the appropriate text as the localizer wanted it, without a reboot being required!

Because the truth is that font linking is a backup solution -- a strategy for how to get glyphs if you cannot find them. But it is by no means an assurance of getting the best results for a specific language -- so if you have localized resources for a particular language, you can pretty much always do better to not rely on GDI font linking to do the job!


This post brought to you by "一" (U+4e00, a.k.a. the first CJK Unified Idedograph)

# Nick Lamb on 9 Mar 2006 4:11 AM:

Of course, doing this breaks one of the HIG style guidelines, which is that you should use the system-wide font preferences of the user rather than choosing whatever font the application author (or in this case the translator) thinks is nicest. The result is that users with sight problems may find the software unusable, while others with more aesthetic reasons for choosing a particular font are needlessly frustrated.

It also relies on the somewhat rash assumption that because the translator's copy of "Mojo Jojo Serif" had all the more obscure glyphs needed therefore the copy installed on the operator's PC must have those glyphs too. That certainly isn't the case with Microsoft's own fonts.

A comprehensive fallback solution does wonders with this problem on other platforms. As i18n and world markets become more important more developers will need this feature and of course if the OS doesn't provide it they'll either roll their own or import 3rd party libraries and either way substantially increase your support problems.

# Michael S. Kaplan on 9 Mar 2006 8:07 AM:

In the case of CJK font linking, it is not done for the sake of the HIG style guidelines; it is done to guide glyph choice in Han unification scenarios, and in the case of Windows, where the exact font contents are known, is not going to be about invalid glyph assumptions either....

Relying on the system locale to pick your fonts is hardly the way to get the best localization for a language. In the CJK scenario, a localizer DOES probably know better!

# Nick Lamb on 9 Mar 2006 5:14 PM:

In a system with comprehensive font fallback the text renderer is language sensitive. Text labelled as Chinese will never use a Japanese font except as a last resort, and similarly Japanese text would never be rendered in a Chinese font except if the alternative was the null glyph. Without such language sensitivity and the accompanying metadata I don't think you can expect to produce good results in International scenarios.

The localizer knows nothing about my aesthetic or accessibility needs, so they're only selecting a font because the renderer or some other component isn't doing enough to help them.

BTW today's sponsorship link is wrong, Latin Capital L might like to join the CJK unification zone but it is trapped down in Basic Latin.

# Michael S. Kaplan on 9 Mar 2006 5:56 PM:

Hi Nick,

You will probably want to read up a bit on what GDI font linking does, since it does not do what you are talking about....

In this case, we are talking about LOCALIZED dialogs, in a specific scenario where relying on the default system locale may not give the best results.

# Nick Lamb on 9 Mar 2006 6:35 PM:

"You will probably want to read up a bit on what GDI font linking does, since it does not do what you are talking about...."

Obviously the word "comprehensive" should have given it away, but my description of comprehensive font fallback was referring to how things work on other, more modern systems, not the primitive GDI font linking available in Windows today.

What's needed to solve your developer's problem is better text rendering provided across the board, not more workarounds.

Presumably Internet Explorer at least gets this right? Chinese web pages render with Chinese glyphs even when viewed by a Japanese user? If Internet Explorer does get this right, why can't the same facility be provided throughout the OS?

The sponsorship link still seems to be wrong.

# Michael S. Kaplan on 9 Mar 2006 7:40 PM:


Sometimes I think you would be happier if you had your own blog where you could describe the universe as you see it.

Where I am, the answer to the question "How do I do ____?" is *not* always REWRITE, REDESIGN, REARCHITECT, etc. I try to help people where they are, when I can.

As for sponsorship links -- that is up to the characters. If you wish to sponsor a post or choose a sponsor, I can give you information on where to send the check. You casn't really choose the sponsors on TV shows, either. :-)

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.

referenced by

2006/06/06 Is this the Über-font post? No, but it is the teaser for it!

2006/03/14 GDI Font Linking in GDI+

2006/03/12 Even less of a fan of blog stats

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