Sorting it all Out Michael Kaplan's random stuff of dubious value Be sure to read the disclaimer here first!
Earlier posts about font linking, substitution and fallback were:
Font substitution and linking #1 (About font substitution)Font substitution and linking #2 (About industrial strength font linking, with MLang)
Anyway, at the end of last month, M.W. Grossman asked me the following question:
Unicode is so much fun. My company has paid me to read through most of your writing today (thanks for the Steve Taylor tip) but haven't found anything that gets into what I'm looking for, namely the method used to determine which font is selected and how to influence this. My problem lies in a mixed CJK system. The won, yuan and yen characters are being displayed differently depending on the client OS (Win2K, CHT/CHS/KOR/JPN). In JPN, everything displays well but both CHT and CHS mangle all currencies but the yuan and dollar. All machines have a number of CJK fonts in addition to MS Mincho and clearly there's some font substitution going on, but how and where? I can't be the only one wondering about this but I can't find anything on the subject beyond references to "MS Shell Dlg 2".
Unicode is so much fun. My company has paid me to read through most of your writing today (thanks for the Steve Taylor tip) but haven't found anything that gets into what I'm looking for, namely the method used to determine which font is selected and how to influence this.
My problem lies in a mixed CJK system. The won, yuan and yen characters are being displayed differently depending on the client OS (Win2K, CHT/CHS/KOR/JPN). In JPN, everything displays well but both CHT and CHS mangle all currencies but the yuan and dollar. All machines have a number of CJK fonts in addition to MS Mincho and clearly there's some font substitution going on, but how and where? I can't be the only one wondering about this but I can't find anything on the subject beyond references to "MS Shell Dlg 2".
An interesting problem, one that is rooted in the issues of Han unification that I have discussed previously.
What it comes down to is that there are many characters which can have four different possible looks:
Now there are nuances like when you install HKSCS stuff for Hong Kong or GB18030 stuff for China and other random things that I'll talk some other time. But the above four are the msin font linking rules.
The change depends on the setting of the NLS default system locale (meaning of course that this is a setting that is not just for non-Unicode programs!). It affects the behavior of several things, according to the rules spelled out above for each group -- linking to the fonts in that given order:
This is the most common Windows XP/Server 2003 list, it changes a bit between versions depending on default UI fonts -- mainly by adding new entries but leaving the old ones intact. Your mileage may vary, especially as some third party font installs will often try to modify these settings, often with success but occasionally with messed up registry setttings....
Now I have gone on for quite a while here, without explaining what this linking does. The essential task performed is to give the operating system a list of fonts to look in and an order to look in them when the requested character cannot be found in the original font. Given that both Han unification and typographic traditions will dictate a specific look, feel, and glyph design to each font, the list is chosen so that a cirrect choice for the default system locale is most likely to give an intuitive look to the text that is shown on Windows.
The actual mapping is found in the registry; it is seen in the values under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink. A change requires a new windowstation, which for all shipping versions of Windows means either a reboot (which the default system locale requires anyway) or a new Terminal Services session.
Of course, the user can always override these things if he wants to by explicitly choosing the 'right' default system locale; the developer can override these things if she needs to p.r.n. by choosing the fonts to use, explicitly. But in both cases, the user and the developer will often just use the default.
But if you are a developer who is wanting to influence the selection here, PLEASE consider explicitly choosing a font rather than changing a system wide setting....
This post brought to you by "一" (U+4e00, a.k.a. the first CJK Unified Idedograph)One of the few ideographs used by all languages that use Han/Kanji/Hanja but that does not tend to vary too much in style....
Kristen brought up a very good question yesterday that one of her testers asked her: This happened on
The other day I was chatting by email with a developer on a unique problem -- she was trying to support
Please read the disclaimer ; content of Michael Kaplan's blog not approved by Microsoft! In particular,