TTGlyph
Last updated at 11:47 am UTC on 4 March 2022
Object subclass: #TTGlyph
instanceVariableNames: 'bounds contours advanceWidth leftSideBearing rightSideBearing glyphIndex'
classVariableNames: ''
poolDictionaries: ''
category: 'TrueType-Fonts'
This class represents a glyph of a TrueType font.
Instance variables:
- bounds The receiver's bounds
- contours The compressed contours in the receiver
- advanceWidth advance width of the glyph
- leftSideBearing left side bearing
- rightSideBearing right side bearing
- glyphIndex the original index of the glyph (used for kerning)
The category 'converting' contains methods to render the glyph as an instance of Form.
asFormWithScale: scale ascender: ascender descender: descender
^ self
asFormWithScale: scale
ascender: ascender
descender: descender
fgColor: Color black
bgColor: Color white
depth: 8
replaceColor: true.
asFormWithScale:ascender:descender:fgColor:bgColor:depth:
See also TTCompositeGlyph