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

by Michael S. Kaplan, published on 2008/03/19 10:01 -04:00, original URI:

Please read the disclaimer; content of Michael Kaplan's blog not approved by Microsoft! In particular, this blog discusses what I think people ought to be doing next in their jobs despite the fact that I have neither authority nor responsibility to make such assessments, across (at least) two teams within Microsoft. Therefore, my opinions should definitely be weighed with that in mind and thus taken with a huge hairy grain of salt -- because even if you agree with me, Microsoft might disagree with both us....

So yesterday, when I blogged Conventional wisdom is retarded, aka What the @#%&* is _O_U16TEXT?, I did a bit of tap dancing around the fact that the Japanese text was showing up as null glyphs (those empty square boxes).

You know, the notdef glyph I have talked about before, and then showed in this screenshot:

You might be curious what is going on there?

If not, you can skip the rest of this post....

First we'll look at the Font tab of my Visual Studio 2005 Command Prompt shortcut, which probably differs slightly from yours since I always get away from the raster fonts, no doubt an occupational hazard!

The only choice for TrueType fonts that I have is Lucida Console.

This is an interesting font with a lot of varied usages -- for example it is one of the main fonts used for [closed] captioning by Media Center and like components (this is hardly secret knowledge even if you aren't a forensic typographer, since it is easy to see that kind of thing when you are looking for it -- that is why movies like Helvetica are so much fun!

Of course it is generally regarded as a less than ideal font for captioning, for reasons including:

Now if you think back to June 2005 and my Font substitution and linking #3 or October 2005 and my Font Linking vs. Font Fallback, the number of fonts that are covered by GDI font linking is rather small. It does include Lucida Sans Unicode, but it does not include Lucida Console.

And because of that, there is no GDI font linking in the console (mitigations like those discussed in Expertise isn't always everything (aka When the one who is learning teaches us something important) do not apply here since there is no way to get a vertical text font specified in the console anyway).

Amazingly enough, no one seems eager to add Lucida Console to the GDI font link chain that other fonts like Tahoma and Microsoft Sans Serif and Lucida Sans Unicode are in. And people seem even less eager to add Uniscribe support to the console (which wouldn't help this case just like it didn't help Arial in that @ post, unless Uniscribe were to take up the CJK question for good in some future version....



# Ben Cooke on 19 Mar 2008 3:21 PM:

I may be remembering wrong -- I get a bit confused about the architecture of NT-based Windows -- but doesn't the console live in the kernel and talk directly to the window manager and GDI?

Can such a component in the kernel use Uniscribe? I would expect not, since IIRC Uniscribe is a userspace DLL implemented in terms of the Win32 API.

# phrosty on 19 Mar 2008 4:28 PM:

on a related note - any clues as to how to make other fonts, like Consolas, appear in that list?

# Michael S. Kaplan on 19 Mar 2008 4:44 PM:

Already asked and answered, here. :-)

# Michael S. Kaplan on 19 Mar 2008 4:48 PM:

Hey Ben,

The situation is both more and less complicated than that. :-)

I might get into that in another post, as the various kernel dependencies in the console, user32, and gdi32 are all interesting....

# Centaur on 20 Mar 2008 6:41 AM:

So, in theory, if we added a font that were in the font linking list or extended the font linking list to cover Lucida Console, we would see the kanji in the console, right?

# Michael S. Kaplan on 20 Mar 2008 7:41 AM:

That is the working theory. Anyone want to try to add Courier New to the list to see if the theory is sound? :-)

# Michael Madsen on 26 Mar 2008 6:34 AM:

I know I'm a bit late, but font linking DOES work. I added an entry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink:

Key=Lucida Console


And kanji shows up in the console when Lucida Console is selected.

There are some drawing issues caused by MS Gothic being wider than Lucida Console - it will cut off the string too early when printing the line originally, but get it right the second time it draws that line (that is, when it uses the buffer or otherwise redraws the entire window) as seen here: (Danish XP Pro SP2)

MS UI Gothic or MS PGothic might be better - I haven't tested this. I also haven't tested how Vista handles this (that'll have to wait until I get home).

# Michael S. Kaplan on 26 Mar 2008 8:47 AM:

It is never too late for good news! :-)

# Michael Madsen on 26 Mar 2008 3:09 PM:

Now I'm home, so I tested it out on Vista - with even better news!

All of the MS Gothics ("regular", PGothic, UI Gothic) share the problem shown in the XP image - so XP users will have to live with the issue shown, unless they have another font (and it is suitable).

Meiryo, however, will scale the characters so they actually fit inside a single character cell. This means you don't have the issue of having "half" strings because the text uses more space than expected, although it's hardly possible to read at the normal font size:

This can be remedied by increasing the font size:

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