org.apache.fontbox.ttf

## Class CmapTable

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

    public class CmapTable
    extends TTFTable

This 'cmap'-table is a required table in a TrueType font.

Author:
  Ben Litchfield

### Field Summary

Fields
`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 String` `TAG` A tag used to identify this table.

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

`initialized`

### Method Summary

All Methods Instance Methods Concrete Methods
`CmapSubtable[]` `getCmaps()`
`CmapSubtable` `getSubtable(int platformId, int platformEncodingId)` Returns the subtable, if any, for the given platform and encoding.
`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 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

#### 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.

Parameters:
  `platformId` - the ID of the given platform
  `platformEncodingId` - the ID of the given encoding
Returns:
  the subtable, if any, or null