public class IndentityGlyphMapper extends GlyphMapper
Note that for fonts with CIDToGIDMaps, it might be tempting to provide a way to skip the CID step and just go from input bytes to GIDs. However, all the font metric info is based on CIDs, so we're always going to have to convert to CIDs no matter what.
| Constructor and Description |
|---|
IndentityGlyphMapper(java.util.Map fontDict,
PDFFile srcfile) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
canHandleEncoding(java.lang.String pdfEncodingName) |
boolean |
isMultiByte()
Returns true if the encoding consumes more than single byte for a character.
|
int |
mapBytesToChars(byte[] inbytes,
int offset,
int length,
char[] outchars)
The workhorse.
|
int |
mapCharsToGIDs(char[] cidbuffer,
int ncids,
int[] gidbuffer)
Does the cid->gid mapping, if it knows how.
|
int |
maximumOutputBufferSize(byte[] inbytes,
int offset,
int length)
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)
For CID fonts that know how to map their cids directly into glyph indices.
|
boolean |
supportsCIDToGIDMapping()
Returns true if encoding knows how to convert to glyph indices.
|
adobeGlyphNameToUnicode, createGlyphMapper, mainpublic IndentityGlyphMapper(java.util.Map fontDict,
PDFFile srcfile)
public static boolean canHandleEncoding(java.lang.String pdfEncodingName)
public void setCIDToGIDMap(java.lang.Object mapobj)
setCIDToGIDMap in class GlyphMapperpublic boolean isMultiByte()
GlyphMapperisMultiByte in class GlyphMapperpublic int maximumOutputBufferSize(byte[] inbytes,
int offset,
int length)
GlyphMappermaximumOutputBufferSize in class GlyphMapperpublic int mapBytesToChars(byte[] inbytes,
int offset,
int length,
char[] outchars)
GlyphMappermapBytesToChars in class GlyphMapperpublic boolean supportsCIDToGIDMapping()
GlyphMappersupportsCIDToGIDMapping in class GlyphMapperpublic int mapCharsToGIDs(char[] cidbuffer,
int ncids,
int[] gidbuffer)
GlyphMappermapCharsToGIDs in class GlyphMapper