Class TrueTypeTable

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TrueTypeTable​(int tag)
      Creates a new instance of TrueTypeTable.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static TrueTypeTable createTable​(TrueTypeFont ttf, java.lang.String tagString)
      Get a new instance of an empty table by tag string
      static TrueTypeTable createTable​(TrueTypeFont ttf, java.lang.String tagString, java.nio.ByteBuffer data)
      Get a new instance of a table with provided data
      java.nio.ByteBuffer getData()
      Get the data in the table
      int getLength()
      Get the size of the table, in bytes
      int getTag()
      Get the table's tag
      void setData​(java.nio.ByteBuffer data)
      Set the data in the table
      static int stringToTag​(java.lang.String tag)
      Turn a string into a tag
      static java.lang.String tagToString​(int tag)
      Get the tag as a string
      java.lang.String toString()
      Put into a nice string
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TrueTypeTable

        protected TrueTypeTable​(int tag)
        Creates a new instance of TrueTypeTable. This method is protected. Use the getTable() methods to get new instances.
        Parameters:
        tag - the tag for this table
    • Method Detail

      • createTable

        public static TrueTypeTable createTable​(TrueTypeFont ttf,
                                                java.lang.String tagString)
        Get a new instance of an empty table by tag string
        Parameters:
        ttf - the font that contains this table
        tagString - the tag for this table, as a 4 character string (e.g. head or cmap)
      • createTable

        public static TrueTypeTable createTable​(TrueTypeFont ttf,
                                                java.lang.String tagString,
                                                java.nio.ByteBuffer data)
        Get a new instance of a table with provided data
        Parameters:
        ttf - the font that contains this table
        tagString - the tag for this table, as a 4 character string (e.g. head or cmap)
        data - the table data
      • getTag

        public int getTag()
        Get the table's tag
      • getData

        public java.nio.ByteBuffer getData()
        Get the data in the table
      • setData

        public void setData​(java.nio.ByteBuffer data)
        Set the data in the table
      • getLength

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

        public static java.lang.String tagToString​(int tag)
        Get the tag as a string
      • stringToTag

        public static int stringToTag​(java.lang.String tag)
        Turn a string into a tag
      • toString

        public java.lang.String toString()
        Put into a nice string
        Overrides:
        toString in class java.lang.Object