com.sun.pdfview.font
public abstract class PDFFont extends Object
Constructor Summary | |
---|---|
protected | PDFFont(String baseFont, PDFFontDescriptor descriptor)
Create a PDFFont given the base font name and the font descriptor |
Method Summary | |
---|---|
String | getBaseFont()
Get the postscript name of this font |
PDFGlyph | getCachedGlyph(char src, String name)
Get a glyph for a given character code. |
PDFFontDescriptor | getDescriptor()
Get the descriptor for this font |
PDFFontEncoding | getEncoding()
Get the encoding for this font |
static PDFFont | getFont(PDFObject obj, HashMap resources)
get the PDFFont corresponding to the font described in a PDFObject.
|
protected abstract PDFGlyph | getGlyph(char src, String name)
Get the glyph for a given character code and name
The preferred method of getting the glyph should be by name. |
List | getGlyphs(String text)
Get the glyphs associated with a given String in this font
|
String | getSubtype()
Get the subtype of this font. |
PDFCMap | getUnicodeMap()
Get the CMap which maps the characters in this font to unicode names |
void | setBaseFont(String baseFont)
Set the postscript name of this font |
void | setDescriptor(PDFFontDescriptor descriptor)
Set the descriptor font descriptor |
void | setEncoding(PDFFontEncoding encoding)
Set the encoding for this font |
void | setSubtype(String subtype)
Set the font subtype |
void | setUnicodeMap(PDFCMap unicodeMap)
Set the CMap which maps the characters in this font to unicode names |
Parameters: baseFont the postscript name of this font descriptor the descriptor for the font
Returns: the postscript name of this font
Parameters: src the character code of this glyph name the name of the glyph, or null if the name is unknown
Returns: a glyph for this character
Returns: the font descriptor
Returns: the encoding which maps from this font to actual characters
For Type1 and TrueType fonts, the dictionary also contains:
BaseFont = (some name, or XXXXXX+Name as a subset of font Name)
For Type3 font, the dictionary contains:
FontBBox = (rectangle)
FontMatrix = (array, typically [0.001, 0, 0, 0.001, 0, 0])
CharProcs = (dictionary)
Resources = (dictionary)
Parameters: src the character code of this glyph name the name of this glyph or null if unknown
Returns: a glyph for this character
Parameters: text the text to translate into glyphs
Returns: the subtype, one of: Type0, Type1, TrueType or Type3
Parameters: baseFont the postscript name of the font