Package 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.
-
-
Field Summary
Fields Modifier and Type Field Description private CmapSubtable[]cmapsstatic intENCODING_MAC_ROMANstatic intENCODING_UNICODE_1_0static intENCODING_UNICODE_1_1static intENCODING_UNICODE_2_0_BMPstatic intENCODING_UNICODE_2_0_FULLstatic intENCODING_WIN_BIG5static intENCODING_WIN_JOHABstatic intENCODING_WIN_PRCstatic intENCODING_WIN_SHIFT_JISstatic intENCODING_WIN_SYMBOLstatic intENCODING_WIN_UNICODE_BMPstatic intENCODING_WIN_UNICODE_FULLstatic intENCODING_WIN_WANSUNGstatic intPLATFORM_MACINTOSHstatic intPLATFORM_UNICODEstatic intPLATFORM_WINDOWSstatic java.lang.StringTAGA tag used to identify this table.-
Fields inherited from class org.apache.fontbox.ttf.TTFTable
initialized
-
-
Constructor Summary
Constructors Constructor Description CmapTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmapSubtable[]getCmaps()CmapSubtablegetSubtable(int platformId, int platformEncodingId)Returns the subtable, if any, for the given platform and encoding.(package private) voidread(TrueTypeFont ttf, TTFDataStream data)This will read the required data from the stream.voidsetCmaps(CmapSubtable[] cmapsValue)-
Methods inherited from class org.apache.fontbox.ttf.TTFTable
getCheckSum, getInitialized, getLength, getOffset, getTag, readHeaders, setCheckSum, setLength, setOffset, setTag
-
-
-
-
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
-
cmaps
private CmapSubtable[] cmaps
-
-
Method Detail
-
read
void read(TrueTypeFont ttf, TTFDataStream data) throws java.io.IOException
This will read the required data from the stream.
-
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 platformplatformEncodingId- the ID of the given encoding- Returns:
- the subtable, if any, or null
-
-