Struct GlyphBox
A bounding box for a glyph, in pixels.
public readonly struct GlyphBox
- Inherited Members
- Extension Methods
Remarks
In most cases, a glyph represents a single unicode code point. In some cases, multiple code points are represented by a single glyph (emojis in most cases). Although data type is float, the actual values should be whole numbers. That best fits to Excel behavior, but there might be some cases in the future, where values can be a floats (e.g. advance could be non-pixels aligned).
Constructors
GlyphBox(float, float, float)
public GlyphBox(float advanceWidth, float emSize, float descent)
Parameters
Properties
AdvanceWidth
Advance width in px of a box for code point. Value should be whole number.
public float AdvanceWidth { get; }
Property Value
Descent
Distance in px from baseline to the bottom of the box.
public float Descent { get; }
Property Value
Remarks
Descent/height is determined by font, not by codepoints of the glyph. Value should be whole number.
EmSize
Size of Em square in pixels. If em is not a square, vertical dimension of em square. Value should be whole number.
public float EmSize { get; }