Method: FT2::GlyphMetrics#h_bearing_x

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

#h_bearing_xObject Also known as: horiBearingX, h_bear_x, hbx

Get the glyph’s left side bearing in horizontal layouts.

Note:

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

Aliases:

FT2::GlyphMetrics#horiBearingX
FT2::GlyphMetrics#h_bear_x
FT2::GlyphMetrics#hbx

Examples:

hbx = slot.metrics.h_bearing_x
hbx = slot.metrics.horiBearingX
hbx = slot.metrics.h_bear_x
hbx = slot.metrics.hbx


1702
1703
1704
1705
1706
# File 'ext/ft2-ruby/ft2.c', line 1702

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