Package com.sun.pdfview.font
Class PDFCMap
- java.lang.Object
-
- com.sun.pdfview.font.PDFCMap
-
public abstract class PDFCMap extends java.lang.ObjectA CMap maps from a character in a composite font to a font/glyph number pair in a CID font.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPDFCMap()Creates a new instance of CMap
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static PDFCMapgetCMap(PDFObject map)Get a CMap, given a PDF object containing one of the following: a string name of a known CMap a stream containing a CMap definitionstatic PDFCMapgetCMap(java.lang.String mapName)Get a CMap, given a string nameintgetFontID(char src)Get the font number assoicated with a given source characterabstract charmap(char src)Map a given source character to a destination characterprotected static PDFCMapparseCMap(PDFObject map)Parse a CMap from a CMap streamprotected static voidpopulateCache()Populate the cache with well-known types
-
-
-
Field Detail
-
cache
private static java.util.HashMap<java.lang.String,PDFCMap> cache
A cache of known CMaps by name
-
-
Method Detail
-
getCMap
public static PDFCMap getCMap(PDFObject map) throws java.io.IOException
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- Throws:
java.io.IOException
-
getCMap
public static PDFCMap getCMap(java.lang.String mapName) throws java.io.IOException
Get a CMap, given a string name- Throws:
java.io.IOException
-
populateCache
protected static void populateCache()
Populate the cache with well-known types
-
parseCMap
protected static PDFCMap parseCMap(PDFObject map) throws java.io.IOException
Parse a CMap from a CMap stream- Throws:
java.io.IOException
-
map
public abstract char map(char src)
Map a given source character to a destination character
-
getFontID
public int getFontID(char src)
Get the font number assoicated with a given source character
-
-