Class HorizontalMetricsTable

java.lang.Object
org.ofdrw.converter.font.HorizontalMetricsTable

public class HorizontalMetricsTable extends Object
A table in a true type font.
Author:
Ben Litchfield
  • Constructor Details

    • HorizontalMetricsTable

      public HorizontalMetricsTable(long[] offset)
  • Method Details

    • parse

      public HorizontalMetricsTable parse(int numHMetrics, int numGlyphs, TTFDataStream data) throws IOException
      Throws:
      IOException
    • getAdvanceWidth

      public int getAdvanceWidth(int gid)
      Returns the advance width for the given GID.
      Parameters:
      gid - GID
      Returns:
      advance width for the given GID.
    • getLeftSideBearing

      public int getLeftSideBearing(int gid)
      Returns the left side bearing for the given GID.
      Parameters:
      gid - GID
      Returns:
      left side bearing for the given GID.