Class CMapFormat0

java.lang.Object
org.loboevolution.pdfview.font.ttf.CMap
org.loboevolution.pdfview.font.ttf.CMapFormat0

public class CMapFormat0 extends CMap

CMapFormat0 class.

Author jkaplan

  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    CMapFormat0(short language)
    Creates a new instance of CMapFormat0
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the data in this map as a byte buffer
    short
    Get the length of this map
    protected byte[]
    Get the whole map
    byte
    map(byte src)
    Map an 8 bit value to another 8 bit value
    char
    map(char src)
    Map a 16 bit value to another 16 but value
    char
    reverseMap(short glyphID)
    Get the src code which maps to the given glyphID
    void
    setData(int length, ByteBuffer data)
    Set the data for this map
    void
    setMap(byte[] glyphIndex)
    Set the entire map
    void
    setMap(byte src, byte dest)
    Set a single mapping entry

    Methods inherited from class org.loboevolution.pdfview.font.ttf.CMap

    createMap, getMap, toString

    Methods inherited from class java.lang.Object

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

    • CMapFormat0

      protected CMapFormat0(short language)
      Creates a new instance of CMapFormat0
      Parameters:
      language - a short.
  • Method Details

    • getLength

      public short getLength()
      Get the length of this map

      Get the length of this table

      Specified by:
      getLength in class CMap
      Returns:
      a short.
    • map

      public byte map(byte src)
      Map an 8 bit value to another 8 bit value

      Map from a byte

      Specified by:
      map in class CMap
      Parameters:
      src - a byte.
      Returns:
      a byte.
    • map

      public char map(char src)
      Map a 16 bit value to another 16 but value

      Cannot map from short

      Specified by:
      map in class CMap
      Parameters:
      src - a char.
      Returns:
      a char.
    • reverseMap

      public char reverseMap(short glyphID)
      Get the src code which maps to the given glyphID

      Get the src code which maps to the given glyphID

      Specified by:
      reverseMap in class CMap
      Parameters:
      glyphID - a short.
      Returns:
      a char.
    • setMap

      public void setMap(byte src, byte dest)
      Set a single mapping entry
      Parameters:
      src - a byte.
      dest - a byte.
    • getMap

      protected byte[] getMap()
      Get the whole map
      Returns:
      an array of
      invalid reference
      byte
      objects.
    • setMap

      public void setMap(byte[] glyphIndex)
      Set the entire map
      Parameters:
      glyphIndex - an array of
      invalid reference
      byte
      objects.
    • getData

      public ByteBuffer getData()
      Get the data in this map as a byte buffer

      Get the data in this map as a ByteBuffer

      Specified by:
      getData in class CMap
      Returns:
      a ByteBuffer object.
    • setData

      public void setData(int length, ByteBuffer data)
      Set the data for this map

      Read the map in from a byte buffer

      Specified by:
      setData in class CMap
      Parameters:
      length - a Integer object.
      data - a ByteBuffer object.