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 <[EMAIL PROTECTED]>
To: Ralph Johnson <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>

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
characters.

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

Cheers,
  - Andreas

_______________________________________________
V3dot10 mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/v3dot10

Reply via email to