org.foray.ps.encode
Class CMap12
java.lang.Object
org.foray.ps.encode.CMap
org.foray.ps.encode.CMap12
- All Implemented Interfaces:
- org.axsl.ps.Cmap, org.axsl.ps.Cmap12, org.axsl.ps.Encoding
public class CMap12
- extends CMap
- implements org.axsl.ps.Cmap12
Class containing a set of 32-bit Unicode ranges that sequentially map to the
same-sized range of glyph indexes. The contents are analogous to a Format 12
TrueType Font cmap table (from which this class derives its name).
Fields inherited from interface org.axsl.ps.Encoding |
INVALID_UNICODE_CHAR |
Constructor Summary |
CMap12(String name,
int expectedEntries)
Constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.axsl.ps.Encoding |
canEncode, isPredefinedPdf, isPredefinedPs |
serialVersionUID
public static final long serialVersionUID
- Constant needed for serialization.
- See Also:
- Constant Field Values
CMap12
public CMap12(String name,
int expectedEntries)
- Constructor.
- Parameters:
name
- The name of this encoding.expectedEntries
- The number of expected entries in this encoding.
Setting this to the correct value will result in more efficient
processing.
getName
public String getName()
- Specified by:
getName
in interface org.axsl.ps.Encoding
addEntry
public void addEntry(CMap12Entry entry)
- Add a new entry to this map.
- Parameters:
entry
- The entry to be added.
addEntry
public void addEntry(int unicodeStart,
int unicodeEnd,
int glyphStartIndex)
- Specified by:
addEntry
in interface org.axsl.ps.Cmap12
encodeCharacter
public int encodeCharacter(int codePoint)
- Specified by:
encodeCharacter
in interface org.axsl.ps.Encoding
decodeCharacter
public int decodeCharacter(int glyphIndexInput)
- Specified by:
decodeCharacter
in interface org.axsl.ps.Encoding
asPostScript
public String asPostScript(org.axsl.ps.Encoding baseEncoding)
- Specified by:
asPostScript
in interface org.axsl.ps.Encoding
getFirstIndex
public int getFirstIndex()
- Specified by:
getFirstIndex
in interface org.axsl.ps.Encoding
getLastIndex
public int getLastIndex()
- Specified by:
getLastIndex
in interface org.axsl.ps.Encoding
Copyright © 2017. All rights reserved.