Class GlyphMappingTable
java.lang.Object
org.docx4j.fonts.fop.complexscripts.fonts.GlyphMappingTable
- Direct Known Subclasses:
GlyphClassTable,GlyphCoverageTable,GlyphMappingTable.EmptyMappingTable,GlyphMappingTable.MappedMappingTable,GlyphMappingTable.RangeMappingTable
public class GlyphMappingTable
extends java.lang.Object
Base class implementation of glyph mapping table. This base class maps glyph indices to arbitrary integers (mappping indices), and is used to implement both glyph coverage and glyph class maps.
This work was originally authored by Glenn Adams (gadams@apache.org).
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGlyphMappingTable.EmptyMappingTableempty mapping table base classprotected static classGlyphMappingTable.MappedMappingTablemapped mapping table base classstatic classGlyphMappingTable.MappingRangeTheMappingRangeclass encapsulates a glyph [start,end] range and a mapping index.protected static classGlyphMappingTable.RangeMappingTablerange mapping table base class -
Field Summary
Fields Modifier and Type Field Description static intGLYPH_MAPPING_TYPE_EMPTYempty mapping tablestatic intGLYPH_MAPPING_TYPE_MAPPEDmapped mapping tablestatic intGLYPH_MAPPING_TYPE_RANGErange based mapping table -
Constructor Summary
Constructors Constructor Description GlyphMappingTable() -
Method Summary
Modifier and Type Method Description java.util.ListgetEntries()Obtain mapping entries.intgetMappedIndex(int gid)Map glyph identifier (code) to coverge index.intgetMappingSize()Obtain size of mapping table, i.e., ciMax + 1, where ciMax is the maximum mapping index.intgetType()Obtain mapping type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
GLYPH_MAPPING_TYPE_EMPTY
public static final int GLYPH_MAPPING_TYPE_EMPTYempty mapping table- See Also:
- Constant Field Values
-
GLYPH_MAPPING_TYPE_MAPPED
public static final int GLYPH_MAPPING_TYPE_MAPPEDmapped mapping table- See Also:
- Constant Field Values
-
GLYPH_MAPPING_TYPE_RANGE
public static final int GLYPH_MAPPING_TYPE_RANGErange based mapping table- See Also:
- Constant Field Values
-
-
Constructor Details
-
GlyphMappingTable
public GlyphMappingTable()
-
-
Method Details
-
getType
public int getType()Obtain mapping type.- Returns:
- mapping format type
-
getEntries
public java.util.List getEntries()Obtain mapping entries.- Returns:
- list of mapping entries
-
getMappingSize
public int getMappingSize()Obtain size of mapping table, i.e., ciMax + 1, where ciMax is the maximum mapping index.- Returns:
- size of mapping table
-
getMappedIndex
public int getMappedIndex(int gid)Map glyph identifier (code) to coverge index. Returns -1 if glyph identifier is not in the domain of the mapping table.- Parameters:
gid- glyph identifier (code)- Returns:
- non-negative glyph mapping index or -1 if glyph identifiers is not mapped by table
-