links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Freetype font support
Last updated at 1:08 am UTC on 17 January 2006

News flash:

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.

Uploaded Image: vera.gif


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.
i version.

"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.
s openInWorld.

"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