Package org.apache.fontbox.ttf
Class CmapSubtable
- java.lang.Object
-
- org.apache.fontbox.ttf.CmapSubtable
-
- All Implemented Interfaces:
CmapLookup
public class CmapSubtable extends java.lang.Object implements CmapLookup
A "cmap" subtable.- Author:
- Ben Litchfield
-
-
Constructor Summary
Constructors Constructor Description CmapSubtable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Integer>getCharCodes(int gid)Returns all possible character codes for the given gid, or null if there is none.intgetGlyphId(int characterCode)Returns the GlyphId linked with the given character code.intgetPlatformEncodingId()intgetPlatformId()voidsetPlatformEncodingId(int platformEncodingIdValue)voidsetPlatformId(int platformIdValue)java.lang.StringtoString()
-
-
-
Method Detail
-
getPlatformEncodingId
public int getPlatformEncodingId()
- Returns:
- Returns the platformEncodingId.
-
setPlatformEncodingId
public void setPlatformEncodingId(int platformEncodingIdValue)
- Parameters:
platformEncodingIdValue- The platformEncodingId to set.
-
getPlatformId
public int getPlatformId()
- Returns:
- Returns the platformId.
-
setPlatformId
public void setPlatformId(int platformIdValue)
- Parameters:
platformIdValue- The platformId to set.
-
getGlyphId
public int getGlyphId(int characterCode)
Returns the GlyphId linked with the given character code.- Specified by:
getGlyphIdin interfaceCmapLookup- Parameters:
characterCode- the given character code to be mapped- Returns:
- glyphId the corresponding glyph id for the given character code
-
getCharCodes
public java.util.List<java.lang.Integer> getCharCodes(int gid)
Returns all possible character codes for the given gid, or null if there is none.- Specified by:
getCharCodesin interfaceCmapLookup- Parameters:
gid- glyph id- Returns:
- a list with all character codes the given gid maps to
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-