True Type Fonts.

Hans-Martin Mosner hm.mosner at cityweb.de
Mon Dec 13 20:07:12 UTC 1999


Henrik Gedenryd wrote:

> Alan Kay wrote:
>
> > In any case, we really need superfast antialiased font rendering in
> > Squeak!
>
> This reminds me of a problem that isn't a legal one (yay!). The core of the
> problem with good TT support is that TT hinting is ultra-complicated to
> support. In order to allow very good rendering, TT has a whole low-level
> programming language for hinting an outline. This requires an interpreter
> with some 200 bytecodes for proper rendering! In effect, a whole Smalltalk
> VM almost for only this purpose.

This is only partially true. in fact, the bytecodes of TT are not very
complicated for the most part. Those that have to do with the actual rendering
are, of course. But there's not real complexity involved, you just have to read
the specs carefully and find out where they're wrong...

> But it also means that it becomes extremely difficult to provide a TT font
> with good hinting quality. And since we would like more or less free fonts
> for Squeak, it is very unlikely that these will have good hinting; font
> software can only generate mediocre TT hinting automatically, for example.
> Thus, good hinting is costly to provide, and this doesn't go well with low
> or no charge. This made me wonder how much use we will actually have for
> hinting support for the kind of fonts we will be able to include! (Ie. how
> much use is there in supporting low-quality hints?)

On many platforms you have a source for TT fonts which are not free but come
bundled with your platform, so you can use them there (you just can't give them
away). Helvetica, Times and Courier are probably always available. For Windows,
you just access the font files in their proper place. On the mac, you'd need a
primitive that extracts the 'sfnt' resource from the font files; it is in
TrueType format. For other platforms, I don't know...

BTW, here's a BitBlt mode request for Dan: What about a mode in which the
source Form contains just alpha values (4 or 8 bits deep). This would be the
ideal vehicle for drawing anti-aliased glyphs with just the standard
primitives. Add fractional widths, and you have all you need to support very
reasonable WYSIWYG functionality. I once did that (frac widths) for
Smalltalk-80, and it was actually quite acceptable in speed (on fast
platforms), although it did not have primitive support.

Hans-Martin





More information about the Squeak-dev mailing list