Package com.ribs.pdf
Class PDFFontFactory
java.lang.Object
com.ribs.pdf.PDFFontFactory
- All Implemented Interfaces:
FontFactory
PDFFontFactory.java
-
Field Summary
Fields inherited from interface com.ribs.pdf.FontFactory
AdobeCIDType0Font, AdobeCIDType2Font, AdobeMultipleMasterFont, AdobeType0Font, AdobeType1Font, AdobeType3Font, TrueTypeFont, UnknownFontType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWhen all else fails, use this font.Look on the system for a font with the given name.Given a Font dictionary with keys and values as described in the pdf spec, return a java.awt.Font to use for it.getGlyphMapper
(Map fontDict, PDFFile srcfile) Create a glyphmapper for the font specified by the pdf font dictionarygetGlyphWidths
(Map fontDict, PDFFile srcfile) Returns the widths for all glyphs in the fonts.getSubstituteFont
(Map fontDict) Try some font substitutions.
-
Constructor Details
-
PDFFontFactory
public PDFFontFactory()
-
-
Method Details
-
getFont
Given a Font dictionary with keys and values as described in the pdf spec, return a java.awt.Font to use for it.- Specified by:
getFont
in interfaceFontFactory
-
getFont
Look on the system for a font with the given name.- Specified by:
getFont
in interfaceFontFactory
-
getSubstituteFont
Try some font substitutions.- Specified by:
getSubstituteFont
in interfaceFontFactory
-
getDefaultFont
When all else fails, use this font. Damn well better return something.- Specified by:
getDefaultFont
in interfaceFontFactory
-
getGlyphMapper
Create a glyphmapper for the font specified by the pdf font dictionary- Specified by:
getGlyphMapper
in interfaceFontFactory
-
getGlyphWidths
Returns the widths for all glyphs in the fonts. Return value is either a float[] for simple single-byte fonts or an instance of a PDFGlyphWidthTable for multi-byte or CID fonts.- Specified by:
getGlyphWidths
in interfaceFontFactory
-