A font of a document that a PdfCanvas shows text with: how text encodes in it, how wide it is, and its vertical metrics. Get one with GetStandard14Font(Standard14Font) or EmbedTrueTypeFont(ReadOnlyMemory<Byte>, Int32).
public abstract class PdfCanvasFont
ISO 32000-2 §9.2.4 (glyph positioning and metrics: widths in thousandths of text space), §9.3 (text state) and §9.4.3 (text
space displacement). A canvas font owns one font dictionary of its document (Font is the read view over it); the
canvas names it in the Font resources and writes each character of shown text as the font's character code.
Metrics are in glyph space units, thousandths of text space: multiply by the font size and divide by 1000 for text space units.
MeasureWidth(ReadOnlySpan<Char>, Double, Boolean) gives the advance of text without character spacing, word spacing or horizontal scaling, which the
canvas's text state adds when the text is shown (§9.4.4: tx = ((w0 − Tj/1000) × Tfs + Tc + Tw) × Th).
kind:method, kind:property, kind:ctor. Press Esc to clear.AppliesWordSpacingGets a value indicating whether word spacing (SetWordSpacing(Double)) widens this font's spaces: true for one-byte encodings, where the space character is code 32 (§9.3.3).AscentGets the maximum height above the baseline of the font's accented capitals, in glyph space units (§9.8.1, Ascent).CapHeightGets the top of flat capital letters above the baseline, in glyph space units (§9.8.1, CapHeight).DescentGets the maximum depth below the baseline of the font's descenders, a negative number in glyph space units (§9.8.1, Descent).FontGets the document-model view of the font dictionary the canvas names (§9.5).FontBBoxGets the smallest rectangle enclosing every glyph of the font drawn at the origin, in glyph space units (§9.8.1, FontBBox).NameGets the font's PostScript name, the BaseFont it is written with (without a subset tag).XHeightGets the top of flat lowercase letters above the baseline, in glyph space units, or 0 when unknown (§9.8.1, XHeight).CanEncode(ReadOnlySpan<Char>)Gets a value indicating whether every character of text has a character code and a glyph in this font.MeasureWidth(ReadOnlySpan<Char>, Double, TextShaping)Measures the advance of text shaped by shaping at fontSize, as Shape(String, TextShaping) then MeasureWidth(Double) would, without keeping the glyphs.MeasureWidth(ReadOnlySpan<Char>, Double, Boolean)Measures the advance of text shown at fontSize: the sum of its glyph widths, and of the font's kerning between neighbouring glyphs when kerning.MeasureWidth(ReadOnlySpan<Char>, Double)Measures the advance of text shown at fontSize without kerning: the sum of its glyph widths.Shape(String, TextShaping)Shapes text into the glyphs this font shows for it: for an embedded OpenType or TrueType program, its GSUB lookups for the features shaping turns on (ligatures, contextual and localised forms, Arabic joining forms), then its GPOS lookups (pair kerning, marks on their bases, cursive attachment; its legacy kern table when GPOS has no kerning); for other fonts, one glyph per character and pair kerning. A right-to-left run shows each character that has a Bidi_Mirroring_Glyph (parentheses, brackets, less-than) with the glyph of its mirror when the font has one.