MeasureWidth(ReadOnlySpan, Double, TextShaping) Method

Definition

Namespace Broadside.Fonts
Assembly Broadside.dll

Measures the advance of text shaped by shaping at fontSize, as Shape(String, TextShaping) then MeasureWidth(Double) would, without keeping the glyphs.

public double MeasureWidth(ReadOnlySpan<char> text, double fontSize, TextShaping shaping)

Parameters

text
ReadOnlySpan<Char>

The text.

fontSize
Double

The font size (Tf's size operand).

shaping
TextShaping

How the text is shaped.

Returns

Double
The advance in unscaled text space units, without character spacing, word spacing or horizontal scaling.

Remarks

OpenType specification, GSUB; ISO 32000-2 §9.2.4 and §9.4.4.