ShapedGlyph(Int32, Int32, Double, Double, Double) Constructor

Definition

Namespace Broadside.Fonts
Assembly Broadside.dll

One glyph of a ShapedText.

public ShapedGlyph(int Code, int Cluster, double Advance, double XOffset, double YOffset)

Parameters

Code
Int32

The character code the canvas writes for the glyph: for an embedded font (Identity-H) its glyph id in the font program, which is also its CID; for a Standard 14 font, its one-byte code.

Cluster
Int32

The UTF-16 index in Text of the first character the glyph shows (a ligature shows several, from here).

Advance
Double

The glyph's advance after positioning, in thousandths of the font size (its width plus kerning and the other GPOS advance adjustments; 0 for a mark).

XOffset
Double

How far the glyph is drawn right of its pen position, in thousandths of the font size (a mark placed on its base, a GPOS placement); it does not move the glyphs after it.

YOffset
Double

How far the glyph is drawn above the baseline, in thousandths of the font size (a mark above or below its base, a cursive connection); it does not move the glyphs after it.

Remarks

OpenType specification, GSUB and GPOS (ValueRecord, mark and cursive attachment); ISO 32000-2 §9.2.4 (glyph widths in thousandths of text space).