Method: FT2::GlyphMetrics#h_advance

Defined in:
ext/ft2-ruby/ft2.c

#h_advanceObject Also known as: horiAdvance, ha

Get the glyph’s advance width for horizontal layouts.

Note:

Values are expressed in 26.6 fractional pixel format or in font
units, depending on context.

Aliases:

FT2::GlyphMetrics#horiAdvance
FT2::GlyphMetrics#ha

Examples:

ha = slot.metrics.h_advance
ha = slot.metrics.horiAdvance
ha = slot.metrics.ha


1750
1751
1752
1753
1754
# File 'ext/ft2-ruby/ft2.c', line 1750

static VALUE ft_glyphmetrics_h_advance(VALUE self) {
  FT_Glyph_Metrics *glyph;
  Data_Get_Struct(self, FT_Glyph_Metrics, glyph);
  return INT2NUM(glyph->horiAdvance);
}