Class CmapSubtable
java.lang.Object
org.ofdrw.converter.font.CmapSubtable
- All Implemented Interfaces:
org.apache.fontbox.ttf.CmapLookup
A "cmap" subtable.
- Author:
- Ben Litchfield
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCharCodes(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.intintinitData(TTFDataStream data) 读取流解析 cmap子表voidsetPlatformEncodingId(int platformEncodingIdValue) voidsetPlatformId(int platformIdValue) toString()
-
Constructor Details
-
CmapSubtable
public CmapSubtable()
-
-
Method Details
-
initData
读取流解析 cmap子表This will read the required data from the stream.
- Parameters:
data- The stream to read the data from.- Returns:
- this
- Throws:
IOException- If there is an error reading the data.
-
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 interfaceorg.apache.fontbox.ttf.CmapLookup- Parameters:
characterCode- the given character code to be mapped- Returns:
- glyphId the corresponding glyph id for the given character code
-
getCharCodes
-
toString
-