PeachDrawing.Text
PeachDrawing.Text.Outlines.SvgGlyph
SvgGlyph(string, string, int, int, int) Constructor
The SVG document that draws a glyph in a font with an SVG table.
public SvgGlyph(string Document, string ElementId, int FirstGlyph, int LastGlyph, int UnitsPerEm);
Parameters
Document System.String
The text of the SVG document.
ElementId System.String
The id of the element that draws the glyph asked for: glyph and the glyph’s number.
FirstGlyph System.Int32
The first glyph the document covers.
LastGlyph System.Int32
The last glyph the document covers.
UnitsPerEm System.Int32
The number of design units in an em, which is how many units of the drawing an em is.
Remarks
A document can cover a range of glyphs. It draws one of them by the element whose id is ElementId, and a
document that covers a single glyph may instead be drawn whole when it has no such element. The drawing is in the coordinate
system of the glyph: the origin is the glyph’s origin on the baseline, one unit is a design unit, and y points down, so
a shape above the baseline has a negative y.
The library returns the document and does not draw it, as it has no SVG renderer. The colours of the font’s CPAL
palette are what the document’s var(--color0), var(--color1) and so on stand for, and the text colour is what
context-fill and currentColor stand for. The document comes from the font file and is untrusted: a compressed
one is inflated up to 4 MiB and no further.