ShowText(ShapedText, ReadOnlySpan) Method

Definition

Assembly Broadside.dll

Shows shaped text with an extra adjustment after each glyph (TJ): positive moves the next glyph left (closer), negative right.

public void ShowText(ShapedText text, ReadOnlySpan<double> adjustments)

Parameters

text
ShapedText

Text shaped in the canvas's current font (Shape(String, TextShaping)).

adjustments
ReadOnlySpan<Double>

One number per glyph of text (in visual order), in thousandths of the font size, subtracted from the position after that glyph; empty for none.

Remarks

ISO 32000-2 §9.4.3, Table 107 (TJ), and §9.4.4: each glyph is written as its character code and moves the text position by its shaped advance (a TJ number makes up the difference from its width); a glyph placed off its pen position (a mark on its base) is moved there by TJ numbers around it, and one placed above or below the baseline is shown with the text rise (§9.3.7, Ts) raised by its offset and then restored. The text each glyph shows is mapped in the font's ToUnicode CMap (§9.10.3; a ligature maps to all its characters). Where that cannot give the text back exactly (a right-to-left run, whose glyphs are written in visual order; a character shown by several glyphs; a glyph already mapped to other text), the glyphs are enclosed in a Span marked-content sequence whose ActualText is the text (§14.9.4, §14.6.2).