org.apache.pdfbox.pdmodel.font

## Interface FontMapper

    public interface FontMapper

Font mapper, locates non-embedded fonts. If you implement this then you're responsible for caching the fonts. SoftReference<FontBoxFont> is recommended.

Author:
  John Hewson

### Method Summary

All Methods Instance Methods Abstract Methods
`CIDFontMapping` `getCIDFont(String baseFont, PDFontDescriptor fontDescriptor, PDCIDSystemInfo cidSystemInfo)` Finds a CFF CID-Keyed font with the given PostScript name, or a suitable substitute, or null.
`FontMapping<org.apache.fontbox.FontBoxFont>` `getFontBoxFont(String baseFont, PDFontDescriptor fontDescriptor)` Finds a font with the given PostScript name, or a suitable substitute, or null.
`FontMapping<org.apache.fontbox.ttf.TrueTypeFont>` `getTrueTypeFont(String baseFont, PDFontDescriptor fontDescriptor)` Finds a TrueType font with the given PostScript name, or a suitable substitute, or null.

### Method Detail

#### getTrueTypeFont

    FontMapping<org.apache.fontbox.ttf.TrueTypeFont> getTrueTypeFont(String baseFont,
                                                                     PDFontDescriptor fontDescriptor)

Finds a TrueType font with the given PostScript name, or a suitable substitute, or null.

Parameters:
  `fontDescriptor` - FontDescriptor

#### getFontBoxFont

    FontMapping<org.apache.fontbox.FontBoxFont> getFontBoxFont(String baseFont,
                                                               PDFontDescriptor fontDescriptor)

Finds a font with the given PostScript name, or a suitable substitute, or null. This allows any font to be substituted with a PFB, TTF or OTF.

Parameters:
  `fontDescriptor` - the FontDescriptor of the font to find

#### getCIDFont

    CIDFontMapping getCIDFont(String baseFont,
                              PDFontDescriptor fontDescriptor,
                              PDCIDSystemInfo cidSystemInfo)

Finds a CFF CID-Keyed font with the given PostScript name, or a suitable substitute, or null. This method can also map CJK fonts via their CIDSystemInfo (ROS).

Parameters:
  `fontDescriptor` - FontDescriptor
  `cidSystemInfo` - the CID system info, e.g. "Adobe-Japan1", if any.