Using TT Fonts?

Hans-Martin Mosner hmm at heeg.de
Sun Aug 25 17:02:50 UTC 2002


Aaron wrote:

> Hey all,
>
> I tried installing a font with:
>
> TTFontReader
>         installTTF: 'C:\WINDOWS\FONTS\LSANS.TTF'
>         asTextStyle: #Lucida
>         sizes: #(8 10 12 18 24)
>
> In a 2.8-based image, and the resulting font looks like garbage.  All
> garbled up.
>

Incidentally, I've been working on exactly that problem and implemented a
TrueTypeFont subclass of AbstractFont which displays antialiased TrueType
glyphs more-or-less correctly. Since the character widths are fractional,
there are certainly cases where old assumptions about integer character
widths will break existing code (One such case in a central place needd to
be fixed to use fractional widths at all). But overall, the results look
quite ok, and editing and formatting is acceptable even on my 233 MHz
PowerPC, so I believe it can be a viable way of getting higher quality fonts
into standard Squeak windows.
Change set is attached. Please report any rough edges or possible
improvements.

Cheers,
Hans-Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TrueType for real.cs.gz
Type: application/octet-stream
Size: 1798 bytes
Desc: Unknown Document
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20020825/aa5af0ed/TrueTypeforreal.cs.obj


More information about the Squeak-dev mailing list