public class LatinGlyphMapper extends GlyphMapper
This class uses the java.nio.charset package to handle macRoman and winAnsi base encodings.
It can also handle a null encoding, which it does by using the adobestandard mapping. Note that this is the right thing for the standard fonts, but not exactly correct all the time. In PDF, a null encoding actually specifies the font's internal (1 byte) encoding.
| Constructor and Description |
|---|
LatinGlyphMapper(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 len,
char[] outchars)
The workhorse.
|
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.
|
adobeGlyphNameToUnicode, createGlyphMapper, main, mapCharsToGIDs, setCIDToGIDMap, supportsCIDToGIDMappingpublic LatinGlyphMapper(java.util.Map fontDict,
PDFFile srcfile)
public static boolean canHandleEncoding(java.lang.String pdfEncodingName)
public boolean isMultiByte()
GlyphMapperisMultiByte in class GlyphMapperpublic int maximumOutputBufferSize(byte[] inbytes,
int offset,
int len)
GlyphMappermaximumOutputBufferSize in class GlyphMapperpublic int mapBytesToChars(byte[] inbytes,
int offset,
int len,
char[] outchars)
GlyphMappermapBytesToChars in class GlyphMapper