Class PDFCMap
java.lang.Object
org.loboevolution.pdfview.font.cid.PDFCMap
- Direct Known Subclasses:
ToUnicodeMap
A CMap maps from a character in a composite font to a font/glyph number
pair in a CID font.
Author jkaplan
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic PDFCMap
Get a CMap, given a string namestatic PDFCMap
Get a CMap, given a PDF object containing one of the following: a string name of a known CMap a stream containing a CMap definitionint
getFontID
(char src) Get the font number assoicated with a given source characterabstract char
map
(char src) Map a given source character to a destination characterprotected static PDFCMap
Parse a CMap from a CMap streamprotected static void
Populate the cache with well-known types
-
Constructor Details
-
PDFCMap
protected PDFCMap()Creates a new instance of CMap
-
-
Method Details
-
getCMap
Get a CMap, given a PDF object containing one of the following: a string name of a known CMap a stream containing a CMap definition- Parameters:
map
- aPDFObject
object.- Returns:
- a
PDFCMap
object. - Throws:
IOException
- if any.
-
getCMap
Get a CMap, given a string name- Parameters:
mapName
- aString
object.- Returns:
- a
PDFCMap
object. - Throws:
IOException
- if any.
-
populateCache
protected static void populateCache()Populate the cache with well-known types -
parseCMap
Parse a CMap from a CMap stream- Parameters:
map
- aPDFObject
object.- Returns:
- a
PDFCMap
object. - Throws:
IOException
- if any.
-
map
public abstract char map(char src) Map a given source character to a destination character- Parameters:
src
- a char.- Returns:
- a char.
-
getFontID
public int getFontID(char src) Get the font number assoicated with a given source character- Parameters:
src
- a char.- Returns:
- a
Integer
object.
-