GlyphMetrics
Mojo struct 🡭
GlyphMetrics
@memory_only
struct GlyphMetricsOne glyph’s layout-relevant measurements, in pixels, at whatever size was last set.
Fields
- advance (
Float64) - bearing_x (
Float64) - bearing_y (
Float64) - width (
Float64) - height (
Float64)
Implemented traits
AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable
Methods
__init__
fn def __init__(out self, advance: Float64, bearing_x: Float64, bearing_y: Float64, width: Float64, height: Float64)One glyph’s layout-relevant measurements, in pixels.
Args:
- advance (
Float64): Cursor distance to the next glyph. - bearing_x (
Float64): Ink bounding box’s left edge, baseline-relative. - bearing_y (
Float64): Ink bounding box’s top edge, baseline-relative. - width (
Float64): Ink bounding box’s width. - height (
Float64): Ink bounding box’s height. - self (
Self)
Returns:
Self