TrueType based TextStyle

Yoshiki.Ohshima at acm.org Yoshiki.Ohshima at acm.org
Tue Dec 3 03:19:54 UTC 2002


  Hello,

> Okay, I give up: why is that--now that I've changed my default font to be
> a CachedTTCFont rendering Arial from an MS Windows TTF--that various
> "announcers" (e.g., the text appearing near the cursor when filing in a
> changeset, loading a package from SqueakMap, filing in a TTCFont, etc.)
> all render there text as white on white background (or transparent on
> white background, I can't tell).  Except for this disappearing text bit,
> I'm quite pleased with this contribution towards a better looking Squeak!
> :)

  So, "CachedTTCFont" must be more natural than "CachingTTCFont":-) I
should change the name along with some other tweaks.

  The problem you mentioned must be in DisplayText>>composeForm.  When
it trys to create a 1bpp form, it becomes a form with all "0" because
there is not pure black pixels in the rendered result.

  Anyway, I didn't mean it to be used for the default fonts.  I'm glad
to know it works ok, though.

  Regarding the cache strategy, the extent of the default placeholder
Forms should be 1 at 1 or even 0 at 0 instead of 16 at 16 to save memory.
Also, for a charset smaller than 256, it doesn't make much sense to do
LRU caching.  It can be a simple table indexed by the char code to
avoid the LRU management cost.

  Lastly, for better looking Squeak, you might want to try Henrik's
sub pixel rendering stuff.  The look of his one should be better than
mine.  The advantage of mine is that it works for the text on
non-white background...

-- Yoshiki



More information about the Squeak-dev mailing list