Interface FontFactory
- All Known Implementing Classes:
- PDFFontFactory
public interface FontFactory
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intConstants used to identify embedded font typesstatic final intstatic final intstatic final intstatic final int
- 
Method SummaryModifier 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) 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.getGlyphWidths(Map fontDict, PDFFile srcfile) Returns the array of widths for all glyphs in the font.getSubstituteFont(Map fontDict) Try some font substitutions.
- 
Field Details- 
AdobeType0Fontstatic final int AdobeType0FontConstants used to identify embedded font types- See Also:
 
- 
AdobeType1Fontstatic final int AdobeType1Font- See Also:
 
- 
AdobeMultipleMasterFontstatic final int AdobeMultipleMasterFont- See Also:
 
- 
AdobeType3Fontstatic final int AdobeType3Font- See Also:
 
- 
TrueTypeFontstatic final int TrueTypeFont- See Also:
 
- 
AdobeCIDType0Fontstatic final int AdobeCIDType0Font- See Also:
 
- 
AdobeCIDType2Fontstatic final int AdobeCIDType2Font- See Also:
 
- 
UnknownFontTypestatic final int UnknownFontType- See Also:
 
 
- 
- 
Method Details- 
getFontGiven a Font dictionary with keys and values as described in the pdf spec, return a java.awt.Font to use for it.
- 
getFontLook on the system for a font with the given name.
- 
getSubstituteFontTry some font substitutions.
- 
getDefaultFontFont getDefaultFont()When all else fails, use this font. Damn well better return something.
- 
getGlyphMapperReturns 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.
- 
getGlyphWidthsReturns 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). 
 
-