GetWidth(Byte) Method

Definition

Namespace Broadside.Fonts
Assembly Broadside.dll

Gets the width of a character code's glyph, in glyph space units: thousandths of text space, except for Type 3 fonts.

public double GetWidth(byte code)

Parameters

code
Byte

The character code.

Returns

Double
The width.

Remarks

ISO 32000-2 §9.6.2.1, Table 109 (Widths), §9.8.1 (MissingWidth) and §9.2.4. A code from FirstChar to LastChar has its Widths element; other codes have the descriptor's MissingWidth. A non-embedded Standard 14 font without Widths takes the width of the code's glyph from its metrics; .notdef is 250 (600 in Courier), as in Acrobat. A Type 3 font's widths are in its glyph space, which its FontMatrix maps to text space.