CmapTable
Date: 2017-05-25

org.apache.fontbox.ttf

## Class CmapTable

- java.lang.Object
- - org.apache.fontbox.ttf.TTFTable
  - - org.apache.fontbox.ttf.CmapTable

-     public class CmapTable
      extends TTFTable

  The "cmap" table of a true type font.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `ENCODING_MAC_ROMAN`
    `static int` | `ENCODING_UNICODE_1_0`
    `static int` | `ENCODING_UNICODE_1_1`
    `static int` | `ENCODING_UNICODE_2_0_BMP`
    `static int` | `ENCODING_UNICODE_2_0_FULL`
    `static int` | `ENCODING_WIN_BIG5`
    `static int` | `ENCODING_WIN_JOHAB`
    `static int` | `ENCODING_WIN_PRC`
    `static int` | `ENCODING_WIN_SHIFT_JIS`
    `static int` | `ENCODING_WIN_SYMBOL`
    `static int` | `ENCODING_WIN_UNICODE_BMP`
    `static int` | `ENCODING_WIN_UNICODE_FULL`
    `static int` | `ENCODING_WIN_WANSUNG`
    `static int` | `PLATFORM_MACINTOSH`
    `static int` | `PLATFORM_UNICODE`
    `static int` | `PLATFORM_WINDOWS`
    `static java.lang.String` | `TAG` A tag used to identify this table.

    - ### Fields inherited from class org.apache.fontbox.ttf.TTFTable

      `font, initialized`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `CmapSubtable[]` | `getCmaps()`
    `CmapSubtable` | `getSubtable(int platformId, int platformEncodingId)` Returns the subtable, if any, for the given platform and encoding.
    `void` | `read(TrueTypeFont ttf, org.apache.fontbox.ttf.TTFDataStream data)` This will read the required data from the stream.
    `void` | `setCmaps(CmapSubtable[] cmapsValue)`

    - ### Methods inherited from class org.apache.fontbox.ttf.TTFTable

      `getCheckSum, getInitialized, getLength, getOffset, getTag`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TAG

          public static final java.lang.String TAG

      A tag used to identify this table.
      See Also:
        Constant Field Values

    - #### PLATFORM_UNICODE

          public static final int PLATFORM_UNICODE

      See Also:
        Constant Field Values

    - #### PLATFORM_MACINTOSH

          public static final int PLATFORM_MACINTOSH

      See Also:
        Constant Field Values

    - #### PLATFORM_WINDOWS

          public static final int PLATFORM_WINDOWS

      See Also:
        Constant Field Values

    - #### ENCODING_MAC_ROMAN

          public static final int ENCODING_MAC_ROMAN

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_SYMBOL

          public static final int ENCODING_WIN_SYMBOL

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_UNICODE_BMP

          public static final int ENCODING_WIN_UNICODE_BMP

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_SHIFT_JIS

          public static final int ENCODING_WIN_SHIFT_JIS

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_BIG5

          public static final int ENCODING_WIN_BIG5

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_PRC

          public static final int ENCODING_WIN_PRC

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_WANSUNG

          public static final int ENCODING_WIN_WANSUNG

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_JOHAB

          public static final int ENCODING_WIN_JOHAB

      See Also:
        Constant Field Values

    - #### ENCODING_WIN_UNICODE_FULL

          public static final int ENCODING_WIN_UNICODE_FULL

      See Also:
        Constant Field Values

    - #### ENCODING_UNICODE_1_0

          public static final int ENCODING_UNICODE_1_0

      See Also:
        Constant Field Values

    - #### ENCODING_UNICODE_1_1

          public static final int ENCODING_UNICODE_1_1

      See Also:
        Constant Field Values

    - #### ENCODING_UNICODE_2_0_BMP

          public static final int ENCODING_UNICODE_2_0_BMP

      See Also:
        Constant Field Values

    - #### ENCODING_UNICODE_2_0_FULL

          public static final int ENCODING_UNICODE_2_0_FULL

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### read

          public void read(TrueTypeFont ttf,
                  org.apache.fontbox.ttf.TTFDataStream data)
                    throws java.io.IOException

      This will read the required data from the stream.
      Parameters:
        `ttf` - The font that is being read.
        `data` - The stream to read the data from.
      Throws:
        `java.io.IOException` - If there is an error reading the data.

    - #### getCmaps

          public CmapSubtable[] getCmaps()

      Returns:
        Returns the cmaps.

    - #### setCmaps

          public void setCmaps(CmapSubtable[] cmapsValue)

      Parameters:
        `cmapsValue` - The cmaps to set.

    - #### getSubtable

          public CmapSubtable getSubtable(int platformId,
                                 int platformEncodingId)

      Returns the subtable, if any, for the given platform and encoding.