Class HmtxTable

java.lang.Object
org.loboevolution.pdfview.font.ttf.TrueTypeTable
org.loboevolution.pdfview.font.ttf.HmtxTable

public class HmtxTable extends TrueTypeTable
Model the TrueType Post table

Author jkaplan

  • Constructor Details

    • HmtxTable

      protected HmtxTable(TrueTypeFont ttf)
      Creates a new instance of HmtxTable
      Parameters:
      ttf - a TrueTypeFont object.
  • Method Details

    • getAdvance

      public short getAdvance(int glyphID)
      get the advance of a given glyph
      Parameters:
      glyphID - a Integer object.
      Returns:
      a short.
    • getLeftSideBearing

      public short getLeftSideBearing(int glyphID)
      get the left side bearing of a given glyph
      Parameters:
      glyphID - a Integer object.
      Returns:
      a short.
    • getData

      public ByteBuffer getData()

      get the data in this map as a ByteBuffer

    • setData

      public void setData(ByteBuffer data)

      Initialize this structure from a ByteBuffer

    • getLength

      public int getLength()
      Get the size of the table, in bytes

      Get the length of this table

      Overrides:
      getLength in class TrueTypeTable
      Returns:
      a Integer object.