public abstract class GlyphMapper
extends java.lang.Object
Constructor and Description |
---|
GlyphMapper(java.util.Map fontDict,
PDFFile srcfile)
Creates a new mapper for the font.
|
Modifier and Type | Method and Description |
---|---|
static int |
adobeGlyphNameToUnicode(java.lang.String name,
java.util.Map fontDict)
Maps a single glyph name string to a unicode value.
|
static boolean |
canHandleEncoding(java.lang.String pdfEncodingName)
Returns true if this subclass knows how to handle the given encoding
|
static GlyphMapper |
createGlyphMapper(java.util.Map fontDict,
PDFFile srcfile)
Search routine to find a GlyphMapper subclass
|
abstract boolean |
isMultiByte()
Returns true if the encoding consumes more than single byte for a character.
|
static void |
main(java.lang.String[] args) |
abstract int |
mapBytesToChars(byte[] inbytes,
int offset,
int len,
char[] outchars)
The workhorse.
|
int |
mapCharsToGIDs(char[] cidbuffer,
int numcids,
int[] gidbuffer)
Does the cid->gid mapping, if it knows how.
|
abstract int |
maximumOutputBufferSize(byte[] inbytes,
int offset,
int len)
Quickly returns the maximum number of chars that could result from the conversion of inbytes bytes according to
the encoding.
|
void |
setCIDToGIDMap(java.lang.Object mapobj)
Sets the cid to glyph index map info.
|
boolean |
supportsCIDToGIDMapping()
Returns true if encoding knows how to convert to glyph indices.
|
public GlyphMapper(java.util.Map fontDict, PDFFile srcfile)
public static boolean canHandleEncoding(java.lang.String pdfEncodingName)
public abstract boolean isMultiByte()
public abstract int maximumOutputBufferSize(byte[] inbytes, int offset, int len)
public abstract int mapBytesToChars(byte[] inbytes, int offset, int len, char[] outchars)
public boolean supportsCIDToGIDMapping()
public void setCIDToGIDMap(java.lang.Object mapobj)
public int mapCharsToGIDs(char[] cidbuffer, int numcids, int[] gidbuffer)
public static GlyphMapper createGlyphMapper(java.util.Map fontDict, PDFFile srcfile)
public static int adobeGlyphNameToUnicode(java.lang.String name, java.util.Map fontDict)
public static void main(java.lang.String[] args)