TTCFont
Last updated at 7:20 am UTC on 9 August 2017
Subclass of AbstractFont
Class comment:
I represent a font that uses TrueType derived glyph. Upon a request for glyph for a character through a call to #formOf: (or #widthOf:), I first search corresponding glyph in the cache. If there is not, it creates a 32bit depth form with the glyph.
The cache is weakly held. The entries are zapped at full GC.
Structure:
- ttcDescription TTFontDescription – The Squeak data structure for a TrueType font data file.
- pointSize Number – Nominal Em size in points. Conversion to pixel sizes depends on the definition of TextStyle class>>pixelsPerInch.
- foregroundColor Color – So far, this font need to know the glyph color in cache.
- cache WeakArray of >
- derivatives Array – stores the fonts in the same family but different emphasis.
Important method:
displayString: aString on: aBitBlt from: startIndex to: stopIndex at: aPoint kern: kernDelta baselineY: baselineY
displayString:on:from:to:at:kern:baselineY:
This method is called from
DisplayText composeForm
through
Project composeDisplayTextIntoForm: displayText
It uses TTGlyph to create an instance of Form.
See also
FontImporterTool
Liberation Sans TrueType font (installation by drag and drop)
Installing and debugging TrueType fonts (an example how to tweak a TrueType font)