setGlyph method
Implementation
void setGlyph(ChantContext ctxt, GlyphCode glyphCode) {
if (this.glyphCode != glyphCode) {
this.glyphCode = glyphCode;
glyph = glyphs[glyphCode];
registerGlyph(ctxt);
}
glyph ??= glyphs[GlyphCode.none];
origin = core.Point(
glyph!.origin.x * ctxt.glyphScaling,
glyph!.origin.y * ctxt.glyphScaling,
);
bounds = core.Rect.fromXYWH(
0,
-origin.y,
glyph!.bounds.width * ctxt.glyphScaling,
glyph!.bounds.height * ctxt.glyphScaling,
);
align = glyph!.align;
}