Package org.apache.pdfbox.pdmodel.font
Class PDFontFactory
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.font.PDFontFactory
-
public final class PDFontFactory extends java.lang.Object
Creates the appropriate font subtype based on information in the dictionary.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.commons.logging.Log
LOG
-
Constructor Summary
Constructors Modifier Constructor Description private
PDFontFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PDFont
createDefaultFont()
Deprecated.(package private) static PDCIDFont
createDescendantFont(COSDictionary dictionary, PDType0Font parent)
Creates a new PDCIDFont instance with the appropriate subclass.static PDFont
createFont(COSDictionary dictionary)
Creates a new PDFont instance with the appropriate subclass.static PDFont
createFont(COSDictionary dictionary, ResourceCache resourceCache)
Creates a new PDFont instance with the appropriate subclass.
-
-
-
Method Detail
-
createFont
public static PDFont createFont(COSDictionary dictionary) throws java.io.IOException
Creates a new PDFont instance with the appropriate subclass.- Parameters:
dictionary
- a font dictionary- Returns:
- a PDFont instance, based on the SubType entry of the dictionary
- Throws:
java.io.IOException
- if something goes wrong
-
createFont
public static PDFont createFont(COSDictionary dictionary, ResourceCache resourceCache) throws java.io.IOException
Creates a new PDFont instance with the appropriate subclass.- Parameters:
dictionary
- a font dictionaryresourceCache
- resource cache, only useful for type 3 fonts, can be null- Returns:
- a PDFont instance, based on the SubType entry of the dictionary
- Throws:
java.io.IOException
- if something goes wrong
-
createDescendantFont
static PDCIDFont createDescendantFont(COSDictionary dictionary, PDType0Font parent) throws java.io.IOException
Creates a new PDCIDFont instance with the appropriate subclass.- Parameters:
dictionary
- descendant font dictionary- Returns:
- a PDCIDFont instance, based on the SubType entry of the dictionary
- Throws:
java.io.IOException
- if something goes wrong
-
createDefaultFont
@Deprecated public static PDFont createDefaultFont() throws java.io.IOException
Deprecated.Create a default font.- Returns:
- a default font
- Throws:
java.io.IOException
- if something goes wrong
-
-