Class: Fontisan::Tables::Hmtx::LongHorMetric
- Inherits:
-
Binary::BaseRecord
- Object
- BinData::Record
- Binary::BaseRecord
- Fontisan::Tables::Hmtx::LongHorMetric
- Defined in:
- lib/fontisan/tables/hmtx.rb
Overview
LongHorMetric record structure
Instance Attribute Summary collapse
-
#advance_width ⇒ Integer
Advance width in FUnits.
-
#lsb ⇒ Integer
Left side bearing in FUnits.
Instance Method Summary collapse
-
#to_h ⇒ Hash
Convert to hash for convenience.
Methods inherited from Binary::BaseRecord
Instance Attribute Details
#advance_width ⇒ Integer
Returns Advance width in FUnits.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fontisan/tables/hmtx.rb', line 47 class LongHorMetric < Binary::BaseRecord uint16 :advance_width int16 :lsb # Convert to hash for convenience # # @return [Hash] Hash with :advance_width and :lsb keys def to_h { advance_width: advance_width, lsb: lsb } end end |
#lsb ⇒ Integer
Returns Left side bearing in FUnits.
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fontisan/tables/hmtx.rb', line 47 class LongHorMetric < Binary::BaseRecord uint16 :advance_width int16 :lsb # Convert to hash for convenience # # @return [Hash] Hash with :advance_width and :lsb keys def to_h { advance_width: advance_width, lsb: lsb } end end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for convenience
54 55 56 |
# File 'lib/fontisan/tables/hmtx.rb', line 54 def to_h { advance_width: advance_width, lsb: lsb } end |