[V3dot10] [Fwd: Re: Fwd: Font bugs]

Andreas Raab andreas.raab at gmx.de
Sun Jul 22 19:44:01 UTC 2007

Another part of the discussion; note in particular how to create 
recursive fallback fonts at the end.

-------- Original Message --------
Subject: Re: Fwd: Font bugs
Date: Sun, 22 Jul 2007 12:08:03 -0700
From: Andreas Raab <andreas.raab at gmx.de>
To: Ralph Johnson <johnson at cs.uiuc.edu>
<e5fa86ac0707211310x72064424v3d492c10a3c7e416 at mail.gmail.com>	 
<e5fa86ac0707211354m4e9cbd23v43bf53e683d12ba7 at mail.gmail.com>	 
<46A2E3E5.7090602 at gmx.de> 
<e5fa86ac0707220412k604a9781w46fb2d64943db88 at mail.gmail.com>

Ralph Johnson wrote:
> Should a fallback font always be a FixedFont?  The problem with
> recursive fonts occurs when a fallback font is a TTCFont, because then
> a TTCFont could have itself as its fallback font.  If a fallback font
> is never a TTCFont then this bug shouldn't happen.

I think that any font should be able to act as a fallback font.
Ultimately it needs to bottom out, but there is no reason why one
couldn't have other fonts as fallbacks. This is also the only reason I
can see for having a fully fledged font there anyways; if all you wanted
is to display a question mark this could be taken care of a lot easier.

> TextStyle>>addNewFontSize adds a fallback font but it seemed that it
> tried to keep the style the same as before.

True, but if you look at the implementors of #setupDefaultFallbackFont
they simply pick the current default font at the closest size. It seems
as if the intent here is to be able to load fonts that only contain
non-latin characters and have the fallback font deal with the latin

Oh, and this also explains how you end up with the recursive fonts. If
you check its senders you'll end up with StrikeFont
class>>setupDefaultFallbackFont which carefully leaves out Accuny from
the list of fallback fonts to install. But of course, if the default
font is anything but Accuny it won't work. So, to screw yourself simply:
1. Change the default font to be any of the ones listed there, say
Accujen 12 (which I like)
2. Run LangEnvBugs (which changes locales and triggers localChanged) or
simply execute StrikeFont localeChanged
3. Boom

   - Andreas

More information about the V3dot10 mailing list