accented font support in Squeak
Dan Ingalls
Dan at SqueakLand.org
Sat Oct 6 14:50:20 UTC 2001
>OK, how do you make a changeset with new fonts? Rather than just amuse you
>with my experiments gone terribly wrong, I'll just ask what the correct
>solution is here.
Hi, Jim -
Take a look at FontSet.
This was perhaps one of the ugliest hacks I ever did, but the result is pretty slick. The idea is that it is a superclass of which you can make subclasses representing sets of fonts. There is protocol there to slurp up a number of fonts in .BF (BitFont) files, or to slurp up all the fonts of a textStyle, and to reproduce a textStyle, given the FontSet.
What it does is jam the bits of the strikeFont for each size into a string literal. Then if you send, eg, #size10 to one of these guys, it will make up the strikeFont from the string literal. As I recall it uses compression on the glyphs, so it is actually quite space-efficient, too.
I think I even wrote a bunch of comments for it.
Enjoy
- Dan
More information about the Squeak-dev
mailing list
|