org.fontbox.ttf

Class CMAPTable


public class CMAPTable
extends TTFTable

A table in a true type font.
Version:
$Revision: 1.1 $
Author:
Ben Litchfield (ben@benlitchfield.com)

Field Summary

static int
ENCODING_BIG5
An encoding constant.
static int
ENCODING_JOHAB
An encoding constant.
static int
ENCODING_PRC
An encoding constant.
static int
ENCODING_SHIFT_JIS
An encoding constant.
static int
ENCODING_SYMBOL
An encoding constant.
static int
ENCODING_UNICODE
An encoding constant.
static int
ENCODING_WANSUNG
An encoding constant.
static int
PLATFORM_WINDOWS
A constant for the platform.
static String
TAG
A tag used to identify this table.

Method Summary

CMAPEncodingEntry[]
getCmaps()
void
initData(TrueTypeFont ttf, TTFDataStream data)
This will read the required data from the stream.
void
setCmaps(CMAPEncodingEntry[] cmapsValue)

Methods inherited from class org.fontbox.ttf.TTFTable

getCheckSum, getLength, getOffset, getTag, initData, setCheckSum, setLength, setOffset, setTag

Field Details

ENCODING_BIG5

public static final int ENCODING_BIG5
An encoding constant.
Field Value:
3

ENCODING_JOHAB

public static final int ENCODING_JOHAB
An encoding constant.
Field Value:
6

ENCODING_PRC

public static final int ENCODING_PRC
An encoding constant.
Field Value:
4

ENCODING_SHIFT_JIS

public static final int ENCODING_SHIFT_JIS
An encoding constant.
Field Value:
2

ENCODING_SYMBOL

public static final int ENCODING_SYMBOL
An encoding constant.
Field Value:
0

ENCODING_UNICODE

public static final int ENCODING_UNICODE
An encoding constant.
Field Value:
1

ENCODING_WANSUNG

public static final int ENCODING_WANSUNG
An encoding constant.
Field Value:
5

PLATFORM_WINDOWS

public static final int PLATFORM_WINDOWS
A constant for the platform.
Field Value:
3

TAG

public static final String TAG
A tag used to identify this table.

Method Details

getCmaps

public CMAPEncodingEntry[] getCmaps()
Returns:
Returns the cmaps.

initData

public void initData(TrueTypeFont ttf,
                     TTFDataStream data)
            throws IOException
This will read the required data from the stream.
Overrides:
initData in interface TTFTable
Parameters:
ttf - The font that is being read.
data - The stream to read the data from.

setCmaps

public void setCmaps(CMAPEncodingEntry[] cmapsValue)
Parameters:
cmapsValue - The cmaps to set.