Class: HexaPDF::Font::TrueType::Table::Hmtx

Inherits:
HexaPDF::Font::TrueType::Table show all
Defined in:
lib/hexapdf/font/true_type/table/hmtx.rb

Overview

The ‘hmtx’ (horizontal metrics) table contains information for the horizontal layout of each glyph in the font.

See: developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6hmtx.html

Defined Under Namespace

Classes: Metric

Constant Summary

Constants inherited from HexaPDF::Font::TrueType::Table

TIME_EPOCH

Instance Attribute Summary collapse

Attributes inherited from HexaPDF::Font::TrueType::Table

#font

Instance Method Summary collapse

Methods inherited from HexaPDF::Font::TrueType::Table

calculate_checksum, #checksum_valid?, #directory_entry, #initialize, #raw_data

Constructor Details

This class inherits a constructor from HexaPDF::Font::TrueType::Table

Instance Attribute Details

#horizontal_metricsObject

A hash of glyph ID to Metric objects mapping.



55
56
57
# File 'lib/hexapdf/font/true_type/table/hmtx.rb', line 55

def horizontal_metrics
  @horizontal_metrics
end

Instance Method Details

#[](glyph_id) ⇒ Object

Returns the Metric object for the give glyph ID.



58
59
60
# File 'lib/hexapdf/font/true_type/table/hmtx.rb', line 58

def [](glyph_id)
  @horizontal_metrics[glyph_id]
end