Interface FontFactory
- 
- All Known Implementing Classes:
- PDFFontFactory
 
 public interface FontFactory
- 
- 
Field SummaryFields Modifier and Type Field Description static intAdobeCIDType0Fontstatic intAdobeCIDType2Fontstatic intAdobeMultipleMasterFontstatic intAdobeType0FontConstants used to identify embedded font typesstatic intAdobeType1Fontstatic intAdobeType3Fontstatic intTrueTypeFontstatic intUnknownFontType
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.FontgetDefaultFont()When all else fails, use this font.java.awt.FontgetFont(java.lang.String name, java.lang.String type)Look on the system for a font with the given name.java.awt.FontgetFont(java.util.Map fontDict, PDFFile srcfile)Given a Font dictionary with keys and values as described in the pdf spec, return a java.awt.Font to use for it.GlyphMappergetGlyphMapper(java.util.Map fontDict, PDFFile srcfile)Returns an instance of a GlyphMapper object which knows how to translate strings as they would appear in the pdf into a suitable encoding for the font.java.lang.ObjectgetGlyphWidths(java.util.Map fontDict, PDFFile srcfile)Returns the array of widths for all glyphs in the font.java.awt.FontgetSubstituteFont(java.util.Map fontDict)Try some font substitutions.
 
- 
- 
- 
Field Detail- 
AdobeType0Fontstatic final int AdobeType0Font Constants used to identify embedded font types- See Also:
- Constant Field Values
 
 - 
AdobeType1Fontstatic final int AdobeType1Font - See Also:
- Constant Field Values
 
 - 
AdobeMultipleMasterFontstatic final int AdobeMultipleMasterFont - See Also:
- Constant Field Values
 
 - 
AdobeType3Fontstatic final int AdobeType3Font - See Also:
- Constant Field Values
 
 - 
TrueTypeFontstatic final int TrueTypeFont - See Also:
- Constant Field Values
 
 - 
AdobeCIDType0Fontstatic final int AdobeCIDType0Font - See Also:
- Constant Field Values
 
 - 
AdobeCIDType2Fontstatic final int AdobeCIDType2Font - See Also:
- Constant Field Values
 
 - 
UnknownFontTypestatic final int UnknownFontType - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getFontjava.awt.Font getFont(java.util.Map fontDict, PDFFile srcfile)Given a Font dictionary with keys and values as described in the pdf spec, return a java.awt.Font to use for it.
 - 
getFontjava.awt.Font getFont(java.lang.String name, java.lang.String type)Look on the system for a font with the given name.
 - 
getSubstituteFontjava.awt.Font getSubstituteFont(java.util.Map fontDict) Try some font substitutions.
 - 
getDefaultFontjava.awt.Font getDefaultFont() When all else fails, use this font. Damn well better return something.
 - 
getGlyphMapperGlyphMapper getGlyphMapper(java.util.Map fontDict, PDFFile srcfile) Returns an instance of a GlyphMapper object which knows how to translate strings as they would appear in the pdf into a suitable encoding for the font. See GlyphMapper.java for more info.
 - 
getGlyphWidthsjava.lang.Object getGlyphWidths(java.util.Map fontDict, PDFFile srcfile)Returns the array of widths for all glyphs in the font. PDF Requires this array to be in the font dictionary, except for the standard 14 fonts. Note that the array is indexed by character code, not glyph code as mapped through the encoding. Size of the width array in the dict is last-first+1 in the dictionary, but this routine should always return either an array of 256 chars or a PDFGlyphWidthTable for cid fonts.It should also do something reasonable if there is no width array (like for the standard 14) Also, width should be for 1 pt font (value in pdf width array/1000). 
 
- 
 
-