org.apache.pdfbox.pdmodel.font

## Class PDFontFactory

- java.lang.Object
- - org.apache.pdfbox.pdmodel.font.PDFontFactory

    public final class PDFontFactory
    extends Object

Creates the appropriate font subtype based on information in the dictionary.

Author:
  Ben Litchfield

### Method Summary

All Methods Static Methods Concrete Methods
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### createFont

    public static PDFont createFont(COSDictionary dictionary)
                             throws 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:
  `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 dictionary
  `resourceCache` - 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