Package org.loboevolution.pdfview.font
Class Type0Font
java.lang.Object
org.loboevolution.pdfview.font.PDFFont
org.loboevolution.pdfview.font.Type0Font
Type 0 fonts are composite fonts with a CMAP to map between
source character codes and destination fonts/codes
Author Jonathan Kaplan
-
Constructor Summary
ConstructorDescriptionType0Font
(String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor) Creates a new instance of Type0Font -
Method Summary
Modifier and TypeMethodDescriptiongetDescendantFont
(int fontID) Get a descendant font of this font by fontIdprotected PDFGlyph
Get the glyph for a given character code and name
-
Constructor Details
-
Type0Font
public Type0Font(String baseFont, PDFObject fontObj, PDFFontDescriptor descriptor) throws IOException Creates a new instance of Type0Font- Parameters:
baseFont
- aString
object.fontObj
- aPDFObject
object.descriptor
- aPDFFontDescriptor
object.- Throws:
IOException
- if any.
-
-
Method Details
-
getDescendantFont
Get a descendant font of this font by fontId -
getGlyph
Get the glyph for a given character code and nameThe preferred method of getting the glyph should be by name. If the name is null or not valid, then the character code should be used. If the both the code and the name are invalid, the undefined glyph should be returned.
Note this method must *always* return a glyph.
Get a character from the first font in the descendant fonts array
-