java.lang.Object
org.sejda.sambox.pdmodel.font.PDFontFactory
Creates the appropriate font subtype based on information in the dictionary.
- Author:
- Ben Litchfield
-
Method Summary
Modifier and TypeMethodDescriptionstatic PDFontDeprecated.static PDFontcreateFont(COSDictionary dictionary) Creates a new PDFont instance with the appropriate subclass.static PDFontcreateFont(COSDictionary dictionary, ResourceCache resourceCache) Creates a new PDFont instance with the appropriate subclass.
-
Method Details
-
createFont
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:
IOException- if something goes wrong
-
createFont
public static PDFont createFont(COSDictionary dictionary, ResourceCache resourceCache) throws 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:
IOException- if something goes wrong
-
createDefaultFont
Deprecated.Create a default font.- Returns:
- a default font
- Throws:
IOException- if something goes wrong
-
PDType1Font.HELVETICA