class Freetype::GlyphMetrics

Overview

A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel format; if the flag FT_LOAD_NO_SCALE has been used while loading the glyph, values are expressed in font units instead.

Note

If not disabled with FT_LOAD_NO_HINTING, the values represent dimensions of the hinted glyph (in case hinting is applicable).

Stroking a glyph with an outside border does not increase ‘horiAdvance’ or ‘vertAdvance’; you have to manually adjust these values to account for the added width and height.

Defined in:

freetype/glyph_metrics.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(glyph_metrics : LibFreetype::FT_Glyph_Metrics) #

[View source]

Instance Method Detail

def height #

The glyph's height.


[View source]
def hori_advance #

Advance width for horizontal layout.


[View source]
def hori_bearing_x #

Left side bearing for horizontal layout.


[View source]
def hori_bearing_y #

Top side bearing for horizontal layout.


[View source]
def vert_advance #

Advance height for vertical layout. Positive values mean the glyph has a positive advance downward.


[View source]
def vert_bearing_x #

Left side bearing for vertical layout.


[View source]
def vert_bearing_y #

Top side bearing for vertical layout. Larger positive values mean further below the vertical glyph origin.


[View source]
def width #

The glyph's width.


[View source]