Package com.ribs.pdf
Class IndentityGlyphMapper
- java.lang.Object
- 
- com.ribs.pdf.GlyphMapper
- 
- com.ribs.pdf.IndentityGlyphMapper
 
 
- 
 public class IndentityGlyphMapper extends GlyphMapper 
- 
- 
Constructor SummaryConstructors Constructor Description IndentityGlyphMapper(java.util.Map fontDict, PDFFile srcfile)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancanHandleEncoding(java.lang.String pdfEncodingName)booleanisMultiByte()Returns true if the encoding consumes more than single byte for a character.intmapBytesToChars(byte[] inbytes, int offset, int length, char[] outchars)The workhorse.intmapCharsToGIDs(char[] cidbuffer, int ncids, int[] gidbuffer)Does the cid->gid mapping, if it knows how.intmaximumOutputBufferSize(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.voidsetCIDToGIDMap(java.lang.Object mapobj)For CID fonts that know how to map their cids directly into glyph indices.booleansupportsCIDToGIDMapping()Returns true if encoding knows how to convert to glyph indices.- 
Methods inherited from class com.ribs.pdf.GlyphMapperadobeGlyphNameToUnicode, createGlyphMapper, main
 
- 
 
- 
- 
- 
Constructor Detail- 
IndentityGlyphMapperpublic IndentityGlyphMapper(java.util.Map fontDict, PDFFile srcfile)
 
- 
 - 
Method Detail- 
canHandleEncodingpublic static boolean canHandleEncoding(java.lang.String pdfEncodingName) 
 - 
setCIDToGIDMappublic void setCIDToGIDMap(java.lang.Object mapobj) For CID fonts that know how to map their cids directly into glyph indices.- Overrides:
- setCIDToGIDMapin class- GlyphMapper
 
 - 
isMultiBytepublic boolean isMultiByte() Description copied from class:GlyphMapperReturns true if the encoding consumes more than single byte for a character. Note that encodings that sometimes maps single bytes, but other times maps more than one, should always return true for this routine.- Specified by:
- isMultiBytein class- GlyphMapper
 
 - 
maximumOutputBufferSizepublic int maximumOutputBufferSize(byte[] inbytes, int offset, int length)Description copied from class:GlyphMapperQuickly returns the maximum number of chars that could result from the conversion of inbytes bytes according to the encoding. A single byte encoding, like the latin ones, will take a single byte and convert it into a single char, so this routine would just return len. An encoding that takes 2 bytes and converts them to a char would return len/2, etc.- Specified by:
- maximumOutputBufferSizein class- GlyphMapper
 
 - 
mapBytesToCharspublic int mapBytesToChars(byte[] inbytes, int offset, int length, char[] outchars)Description copied from class:GlyphMapperThe workhorse. Take an input buffer and convert everything. The output buffer should be allocated using the size from the above routine. The actual number of chars in the final output is returned.- Specified by:
- mapBytesToCharsin class- GlyphMapper
 
 - 
supportsCIDToGIDMappingpublic boolean supportsCIDToGIDMapping() Description copied from class:GlyphMapperReturns true if encoding knows how to convert to glyph indices.- Overrides:
- supportsCIDToGIDMappingin class- GlyphMapper
 
 - 
mapCharsToGIDspublic int mapCharsToGIDs(char[] cidbuffer, int ncids, int[] gidbuffer)Description copied from class:GlyphMapperDoes the cid->gid mapping, if it knows how. Returns the total number of glyphs created.- Overrides:
- mapCharsToGIDsin class- GlyphMapper
 
 
- 
 
-