registerGlyph method
Implementation
void registerGlyph(ChantContext ctxt) {
if (ctxt.defs.containsKey(glyphCode!.code)) return;
ctxt.defs[glyphCode!.code] = QuickSvg.createFragment(
'g',
getDefProps(ctxt),
QuickSvg.svgFragmentForGlyph(glyph!),
);
ctxt.defsNode.children.add(
QuickSvg.createNode(
'g',
getDefProps(ctxt),
QuickSvg.nodesForGlyph(glyph!, QuickSvg.createNode),
),
);
ctxt.makeDefs.add(
() => QuickSvg.createSvgTree(
'g',
getDefProps(ctxt),
QuickSvg.nodesForGlyph(glyph!, QuickSvg.createSvgTree),
),
);
}