by Michael S. Kaplan, published on 2005/03/20 08:35 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/03/20/399322.aspx
Ok, there will be several posts on this topic, starting from the core support in GDI/Windows and moving concentrically outward to information on usage in Uniscribe, MLang, and Office.
I'll start with font substitution.
At the simplest level, this feature is what it sounds like -- simple substitution of one font name with another.
It starts with a registry key (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes). In Windows Server 2003 that key contains the following:
"Courier New Baltic,186"="Courier New,186"
"Courier New CE,238"="Courier New,238"
"Courier New CYR,204"="Courier New,204"
"Courier New Greek,161"="Courier New,161"
"Courier New TUR,162"="Courier New,162"
"Times New Roman Baltic,186"="Times New Roman,186"
"Times New Roman CE,238"="Times New Roman,238"
"Times New Roman CYR,204"="Times New Roman,204"
"Times New Roman Greek,161"="Times New Roman,161"
"Times New Roman TUR,162"="Times New Roman,162"
"Helv"="MS Sans Serif"
"Times"="Times New Roman"
"Tms Rmn"="MS Serif"
"MS Shell Dlg"="Microsoft Sans Serif"
"MS Shell Dlg 2"="Tahoma"
These entries can be put into three categories (which are color-coded above):
BLACK - these are entries that were formerly used by many applications to combine font family (name) choice with font character set choice (basically the lfFaceName and lfCharSet members of the LOGFONT struct). I'll talk more about lfCharSet and what it used to do (and sometimes still does) another day. But in any case these names are not really used much anymore. When they are used in applications, their presence in the FontSubstitutes subkey makes them work properly.
GREEN - these entries allow some common abbreviated names to work. Their usage is self-explanatory.
BLUE - these entries are the ones behind the huge effort to support MS Shell Dlg as a UI font name (also described here and in article 282187 in the knowledge base). In fact, these two entries are the only ones that can be considered useful for more than just backward compatibility with no longer used methodologies. Raymond Chen also has good advice about getting the right font used via DS_SHELLFONT in the articles What's the deal with the DS_SHELLFONT flag? and What other effects does DS_SHELLFONT have on property sheet pages? for those who are interested.
Of course it seems odd that MS Shell Dlg, documented as a version independent, language independent pseudo-font name seems to be hard coded to use fonts that do not support all languages. Wasn't it designed to get people away from hard-coding Tahoma or Microsoft Sans Serif? And the answer is yes -- it was. Luckily those font names are affected by a different font mapping technology, font linking, which I will describe in a future post in this series....
There is another kind of font substitution that is occasionally seen in documentation, which relates to printer drivers and what they do to substitute fonts built into printer hardware when thay can. My personal belief (with my admitted bias towards good international functionality) is that it is important to not use this feature since even printer fonts that accurately handle the basic glyphs seldom have the full support for all scripts (not to mention complex scripts!). In fact, one of the first things I do with each new version of Word is find out how to set the Print TrueType Fonts as Graphics setting that allow what is on the screen to be what gets printed rather than using device fonts....
This post brought to you by "ڜ" (U+069c, a.k.a. ARABIC LETTER SEEN WITH THREE DOTS BELOW AND THREE DOTS ABOVE)
A character not seen in most device fonts!
# Mike Dunn on 20 Mar 2005 8:27 AM:
# Michael Kaplan on 20 Mar 2005 10:03 AM:
# Mike Dunn on 20 Mar 2005 12:44 PM:
# Eric on 21 Mar 2005 6:33 AM:
# Michael Kaplan on 21 Mar 2005 6:45 AM:
# Michael Kaplan on 21 Mar 2005 7:52 AM:
# Mike Dimmick on 21 Mar 2005 10:38 AM:
# Michael Kaplan on 21 Mar 2005 8:48 PM:
# Aidan Corey on 7 Apr 2005 6:16 AM:
# Michael S. Kaplan on 7 Apr 2005 6:51 AM:
# Jai on 9 May 2005 7:49 AM:
2010/07/12 Making a font fetish a bit more mainstream
2006/03/18 What about logical fonts?
2006/01/22 Questions about font linking, etc.
2005/06/18 Font substitution and linking #3
2005/05/16 Font substitution and linking #2
go to newer or older post, or back to index or month or day