Font Linking vs. Font Fallback

by Michael S. Kaplan, published on 2005/10/01 10:09 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/10/01/476022.aspx


Yesterday I was with our international MVPs all day as they were meeting with various people all across GIFT and GPTS. It was exciting for me because I had the chance to learn about a lot of things that I do not usually get exposure to, if you know what I mean....

One of the interesting points that came up is the difference between these two technologies (linking vs. fallback), both of which are intended to help with the same problem -- you select a font and then try to use that font to view characters that do not exist within it. But how they work in Windows is very different.

I will limit things in scope at the moment, but soon I will expand it to talk about differences in MLang, Office, and maybe even Avalon....

Font fallback is what Uniscribe uses. With its own internal knowledge of the best fonts to use for the various scripts that it supports, any time it is asked to render a character that is not in the selected font, it borrows the glyph from its preferred font for the script. Note that you can override this choice at any time by simply making sur your initial font contains the characters you want and all of the shaping rules/tables than an OpenType font brings to the mix. If fallback does not do the trick, Uniscribe will fall back to linking.

Font linking, on the other hand, is what GDI uses. It is the value list of fonts under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink that gives the list of fonts to look in if the character cannot be found, and the order to look at them. Again, you can override the mechanism by making sure the initial font you choose has the glyphs.

In this particular case, FALLBACK gets used pretty much exclusively in the case where you have a complex script, something that needs Uniscribe to do its work. And if you look at LINKING, for the most part it is exclusively used to help the East Asian story by allowing the default system locale to choose an ordering for where to look for the appropriate ideograph glyphs in fonts (though the mechanism can be expanded, and sometimes is by ISVs, to cover other languages and scripts).

Now of course the way that the terms are used by other technologies is actually different in some cases, as are their mechanisms -- I will cover this soon (for now I have to get to a presentation for the Shell MVPs, where I am acting as both the 'Slide Boy' and one of the two 'Demo Boys'. :-)


# Suz on 1 Oct 2005 2:06 PM:

I know that I can post Indic scripts with no font problems, but classical Greek is always dicy. Everyone sees it differently. No fallback that I can see.

http://abecedaria.blogspot.com/2005/09/polytonic-greek-fonts.html

The first quote with no font defined is full of boxes for me. Only the one with Tahoma is reliable on other machines.

Have you explained this and I just didn't understand. Sorry.

# Michael S. Kaplan on 1 Oct 2005 6:46 PM:

Hi Suzanne!

All three with defined fonts work for me on XP SP2 with Uniscribe turned on.

The issues you are referring to relate to app-specific behvior (the browser in this case), which I will cover soon....

# Suz on 1 Oct 2005 7:28 PM:

But the one without the defined font does not display properly, right. I do have to define my font, or, shouldn't have to? And yes I am using IE.

I'll wait for the post on this topic.

# Michael S. Kaplan on 1 Oct 2005 7:57 PM:

Correct, Suzanne, that one is not displaying properly.

# Andreas Magnusson on 3 Oct 2005 10:42 AM:

This sounds interesting, I wrote a simple text-editor a while back and used Uniscribe to implement correct caret movement but not for rendering, for which I used the GDI.

I don't know what I did wrong but I never noticed neither any font-fallback nor font-linking when I had strings with mixed Thai and Chinese in my editor. The Thai characters would display fine, but the Chinese ones would come out as "boxes".

So I'm looking forward to the continuation of this...

Great blog btw (i've been reading it for a while but not posted before).

Adrian on 11 Mar 2010 11:08 AM:

I've seen a few places assert that Uniscribe will automatically apply font fallback and/or font linking, yet the documentation says just the opposite.

"Once it has determined that font fallback is required, *the application* must assign a fallback font."

http://msdn.microsoft.com/en-us/library/dd374105(VS.85).aspx

Can you clarify what you meant about Uniscribe doing some of this work?

Michael S. Kaplan on 11 Mar 2010 4:14 PM:

ScriptShape (the topic you link to) is low-level Uniscribe, where none of the stuff I talk about applies and you have to do it all yourself....


referenced by

2008/11/19 Apocalypse Font (aka Guess they must have picked the wrong eight characters.)

2008/03/19 The forensic typographers found no link to Lucida Console, and the D.A. had nothing to fallback to

2007/06/09 Guilt by [font ]association (aka The consequences of picking the wrong font #3)

2007/02/27 They do it with MLang

2007/02/06 MLang and GDI and Uniscribe, oh my!

2006/10/11 You got your latins in my hebrew! No, you got your hebrew in my latins!

2006/06/16 Neither GDI nor Uniscribe solve the ultimate font problem completely, either

2006/05/05 UI language of the LocalSystem account (which almost never shows UI)

2006/03/18 What about logical fonts?

2006/03/14 GDI Font Linking in GDI+

2006/01/22 Questions about font linking, etc.

2005/12/12 Ready... set... Reboot Redux

2005/10/18 Font Linking vs. Font Fallback, #2

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