Class NameTable

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

public class NameTable extends TrueTypeTable

NameTable class.

Author jon

  • Field Details

    • PLATFORMID_UNICODE

      public static final short PLATFORMID_UNICODE
      Values for platformID
      See Also:
    • PLATFORMID_MACINTOSH

      public static final short PLATFORMID_MACINTOSH
      Constant PLATFORMID_MACINTOSH=1
      See Also:
    • PLATFORMID_MICROSOFT

      public static final short PLATFORMID_MICROSOFT
      Constant PLATFORMID_MICROSOFT=3
      See Also:
    • ENCODINGID_MAC_ROMAN

      public static final short ENCODINGID_MAC_ROMAN
      Values for platformSpecificID if platform is Mac
      See Also:
    • ENCODINGID_UNICODE_DEFAULT

      public static final short ENCODINGID_UNICODE_DEFAULT
      Values for platformSpecificID if platform is Unicode
      See Also:
    • ENCODINGID_UNICODE_V11

      public static final short ENCODINGID_UNICODE_V11
      Constant ENCODINGID_UNICODE_V11=1
      See Also:
    • ENCODINGID_UNICODE_V2

      public static final short ENCODINGID_UNICODE_V2
      Constant ENCODINGID_UNICODE_V2=3
      See Also:
    • LANGUAGEID_MAC_ENGLISH

      public static final short LANGUAGEID_MAC_ENGLISH
      Values for language ID if platform is Mac
      See Also:
    • NAMEID_FAMILY

      public static final short NAMEID_FAMILY
      Constant NAMEID_FAMILY=1
      See Also:
    • NAMEID_SUBFAMILY

      public static final short NAMEID_SUBFAMILY
      Constant NAMEID_SUBFAMILY=2
      See Also:
    • NAMEID_SUBFAMILY_UNIQUE

      public static final short NAMEID_SUBFAMILY_UNIQUE
      Constant NAMEID_SUBFAMILY_UNIQUE=3
      See Also:
    • NAMEID_FULL_NAME

      public static final short NAMEID_FULL_NAME
      Constant NAMEID_FULL_NAME=4
      See Also:
    • NAMEID_VERSION

      public static final short NAMEID_VERSION
      Constant NAMEID_VERSION=5
      See Also:
    • NAMEID_POSTSCRIPT_NAME

      public static final short NAMEID_POSTSCRIPT_NAME
      Constant NAMEID_POSTSCRIPT_NAME=6
      See Also:
    • NAMEID_TRADEMARK

      public static final short NAMEID_TRADEMARK
      Constant NAMEID_TRADEMARK=7
      See Also:
  • Constructor Details

    • NameTable

      protected NameTable()
      Creates a new instance of NameTable
  • Method Details

    • getCharsetName

      public static String getCharsetName(int platformID, int encodingID)
      Get the charset name for a given platform, encoding and language
      Parameters:
      platformID - a Integer object.
      encodingID - a Integer object.
      Returns:
      a String object.
    • addRecord

      public void addRecord(short platformID, short platformSpecificID, short languageID, short nameID, String value)
      Add a record to the table
      Parameters:
      platformID - a short.
      platformSpecificID - a short.
      languageID - a short.
      nameID - a short.
      value - a String object.
    • getRecord

      public String getRecord(short platformID, short platformSpecificID, short languageID, short nameID)
      Get a record from the table
      Parameters:
      platformID - a short.
      platformSpecificID - a short.
      languageID - a short.
      nameID - a short.
      Returns:
      a String object.
    • removeRecord

      public void removeRecord(short platformID, short platformSpecificID, short languageID, short nameID)
      Remove a record from the table
      Parameters:
      platformID - a short.
      platformSpecificID - a short.
      languageID - a short.
      nameID - a short.
    • hasRecords

      public boolean hasRecords(short platformID)
      Determine if we have any records with a given platform ID
      Parameters:
      platformID - a short.
      Returns:
      a boolean.
    • hasRecords

      public boolean hasRecords(short platformID, short platformSpecificID)
      Determine if we have any records with a given platform ID and platform-specific ID
      Parameters:
      platformID - a short.
      platformSpecificID - a short.
      Returns:
      a boolean.
    • getData

      public ByteBuffer getData()

      Get the data in this table as a buffer

    • setData

      public void setData(ByteBuffer data)

      Read the table from data

    • 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.
    • getCount

      public short getCount()
      Get the number of records in the table
      Returns:
      a short.
    • toString

      public String toString()

      Put into a nice string

      Get a pretty string

      Overrides:
      toString in class TrueTypeTable
    • getNames

      public Collection<String> getNames()

      getNames.

      Returns:
      a Collection object.