One glyph shown by a text-showing operator, with everything needed to place it: the single source of glyph positions for rendering, extraction and hit testing. Valid only during the callback that received it.
public ref readonly struct GlyphEvent
ISO 32000-2 §9.4.3 (Table 107) and §9.4.4. The glyph is drawn in text space mapped by TextMatrix and then
Ctm: T_rm = [T_fs·T_h 0 0 T_fs 0 T_rise] × T_m × CTM.
Declared with the content interpreter's processor surface (issue #55); text showing reports it from issue #56, which adds the resolved font. Members are added, never changed.
kind:method, kind:property, kind:ctor. Press Esc to clear.AdjustmentGets the TJ number that came right before the glyph, in thousandths of text space units; 0 when none (§9.4.3).AdvanceXGets the horizontal advance t_x applied to the text matrix after the glyph, spacing included (§9.4.4).AdvanceYGets the vertical advance t_y applied to the text matrix after the glyph, spacing included (§9.4.4).CharacterCodeGets the character code (§9.4.3): one byte for a simple font, one to four for a composite font's CMap.CodeLengthGets the number of bytes the code takes.CtmGets the CTM.DeviceAdvanceXGets the horizontal component of the glyph's advance in device space: the text-space advance (AdvanceX, AdvanceY) mapped by the text matrix T_m and the CTM, so the next glyph's DeviceOrigin is this one's plus the advance (when no TJ number, spacing change or text positioning comes between them).DeviceAdvanceYGets the vertical component of the glyph's advance in device space; see DeviceAdvanceX.DeviceOriginGets the glyph's origin in device space, the space the CTM maps to: text space's origin mapped by TextMatrix and then Ctm. For a page run, whose initial CTM is the identity, this is default user space (device-independent).FontGets the font the glyph is shown in: the one Tf (or the Font entry of a graphics state parameter dictionary) selected; Helvetica's Standard 14 metrics when text is shown before any font is selected or the font is missing.FontDictionaryGets the font dictionary named by Tf.HorizontalDisplacementGets the glyph's horizontal displacement w0, in text space units (§9.2.4).IsHiddenGets a value indicating whether optional content hides the glyph (§8.11.3.1).IsVerticalGets a value indicating whether the font writes vertically (§9.7.4.3).RenderingModeGets the text rendering mode (§9.3.6).SourceBytesGets the bytes of the string the code was read from.SourceIndexGets the offset of the code's first byte in SourceBytes.TextMatrixGets the matrix from text space to user space for this glyph: [T_fs·T_h 0 0 T_fs 0 T_rise] × T_m.Type3MetricsGets what the glyph's description declares when Font is a Type 3 font: whether it began with d0 (shape and colour) or d1 (shape only, painted in the text's colour), the width it gives and the d1 bounding box, in glyph space (FontMatrix maps it to text space). Kind None for other fonts and for a code with no description.UnicodeGets the Unicode text the character code stands for, worked out by Font when read: one or more UTF-16 units (a ligature, a surrogate pair), empty for a code mapped to no text, U+FFFD when nothing maps it.UnicodeSourceGets which method of ISO 32000-2 §9.10.2 mapped the character code to Unicode.VerticalDisplacementGets the glyph's vertical displacement w1, in text space units (§9.2.4).WordSpacingAppliedGets a value indicating whether word spacing was applied (a single-byte code 32, §9.3.3).