Object <- FontDescription <- Font <- BitmapFont |
|
|
FontDraw FontOffsets FontTotalWidth FontWidths ItalicFillMask MaximumGlyphWidth ScaledSize ScreenCanvasPixelSize UseSpaceIfMissing Validate |
|
Ascent Descent GlyphCount Height |
| Field | Type | |
|---|---|---|
| FontDescription: | fontIdentifier: | Buffer |
| fontName: | Text | |
| fontSize: | Unsigned | |
| isBold: | Boolean | |
| isItalic: | Boolean | |
| isUnderlined: | Boolean | |
| BitmapFont: | bits: | Object |
| glyphCount: | UnsignedShort | |
| pixelSize: | SignedShort | |
| maximumWidth: | SignedShort | |
| maximumKern: | SignedShort | |
| ascent: | SignedShort | |
| descent: | SignedShort | |
| maximumGlyphWidth: | SignedShort |
instance BitmapFont tag; fontIdentifier: nilObject; fontName: nilObject; fontSize: 0; isBold: false; isItalic: false; isUnderlined: false; bits: nilObject; glyphCount: 0; pixelSize: 0; maximumWidth: 0; maximumKern: 0; ascent: 0; descent: 0; maximumGlyphWidth: 0; end instance;
Define Class BitmapFont; inherits from Font; uses extra; /* contains sparse glyph map */ field bits: Object; field glyphCount: UnsignedShort, getter; field pixelSize: SignedShort; field maximumWidth: SignedShort; field maximumKern: SignedShort; field ascent: SignedShort; field descent: SignedShort; field maximumGlyphWidth: SignedShort; overrides Ascent; overrides Descent; overrides Height; overrides MaximumGlyphWidth; overrides FontDraw; overrides FontTotalWidth; overrides FontWidths; overrides FontOffsets; overrides ScaledSize; attribute GlyphCount: UnsignedShort, readOnly; intrinsic ScreenCanvasPixelSize(): SignedShort; // used in bitmap fonts and TextStyle to convert between bitmap pixels and Micron intrinsic ItalicFillMask(dstBox: Box; mask: Canvas; srcBox: Box; colorant: Unsigned; mode: Signed; slant: Signed; descent: SignedShort); intrinsic UseSpaceIfMissing(character: Character): Boolean; #ifdef VALIDATE overrides Validate; #endif end class;