Freetype font support
Last updated at 1:08 am UTC on 17 January 2006
Downloadable version (of the font display code) complete with Bitstream Vera fonts is available from SqueakMap:
Ongoing development versions can be downloaded from Ned Konz's Monticello repository at:
This changeset adds a new bitblt (to blt a alpha mask) and a new plugin for loading and displaying truetype fonts. It is based on the freetype 2 library. Loading a font is very fast and I see no delays in displaying the fonts.
The package is bundled with two ".so" files for linux and a example truetype file (vera.ttf).
This example was known to work;
> squeak -plugins 'FT2/libs'
and in the workspace.
"Create interface and ask for a version (must be 2.0.9 or higher)"
i := FT2Interface new.
"Create a font array with fonts of different sizes"
fa := i fontArrayFromFile:'FT2/ttf/Vera.ttf' sizes: #(12 16 24 32 64).
s := StringMorph contents:'Fox etc.' font: fa last.
s color: Color blue.
"Create and install a text style, look in the appearance font dir"
i textStyleFromFile:'FT2/ttf/Vera.ttf' sizes: #(12 16 24 32 64).
Arjen van Elteren