public class FontMapperImpl extends Object implements org.apache.pdfbox.pdmodel.font.FontMapper
Modifier and Type | Method and Description |
---|---|
void |
addSubstitute(String match,
String replace)
Adds a top-priority substitute for the given font.
|
org.apache.pdfbox.pdmodel.font.CIDFontMapping |
getCIDFont(String baseFont,
org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor,
org.apache.pdfbox.pdmodel.font.PDCIDSystemInfo cidSystemInfo)
Finds a CFF CID-Keyed font with the given PostScript name, or a suitable substitute, or null.
|
org.apache.pdfbox.pdmodel.font.FontMapping<org.apache.fontbox.FontBoxFont> |
getFontBoxFont(String baseFont,
org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
Finds a font with the given PostScript name, or a suitable substitute, or null.
|
org.apache.pdfbox.pdmodel.font.FontCache |
getFontCache()
Returns the font cache associated with this FontMapper.
|
Map<String,FontInfo> |
getFontInfoByName() |
static FontMapperImpl |
getInstance()
Returns this instance
|
FontProvider |
getProvider()
Returns the font service provider.
|
org.apache.pdfbox.pdmodel.font.FontMapping<org.apache.fontbox.ttf.TrueTypeFont> |
getTrueTypeFont(String baseFont,
org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
Finds a TrueType font with the given PostScript name, or a suitable substitute, or null.
|
void |
resetFontInfoByName() |
void |
setProvider(FontProvider fontProvider)
Sets the font service provider.
|
public static FontMapperImpl getInstance()
public void setProvider(FontProvider fontProvider)
public FontProvider getProvider()
public org.apache.pdfbox.pdmodel.font.FontCache getFontCache()
public void resetFontInfoByName()
public void addSubstitute(String match, String replace)
match
- PostScript name of the font to matchreplace
- PostScript name of the font to use as a replacementpublic org.apache.pdfbox.pdmodel.font.FontMapping<org.apache.fontbox.ttf.TrueTypeFont> getTrueTypeFont(String baseFont, org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
getTrueTypeFont
in interface org.apache.pdfbox.pdmodel.font.FontMapper
fontDescriptor
- FontDescriptorpublic org.apache.pdfbox.pdmodel.font.FontMapping<org.apache.fontbox.FontBoxFont> getFontBoxFont(String baseFont, org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor)
getFontBoxFont
in interface org.apache.pdfbox.pdmodel.font.FontMapper
fontDescriptor
- the FontDescriptor of the font to findpublic org.apache.pdfbox.pdmodel.font.CIDFontMapping getCIDFont(String baseFont, org.apache.pdfbox.pdmodel.font.PDFontDescriptor fontDescriptor, org.apache.pdfbox.pdmodel.font.PDCIDSystemInfo cidSystemInfo)
getCIDFont
in interface org.apache.pdfbox.pdmodel.font.FontMapper
fontDescriptor
- FontDescriptorcidSystemInfo
- the CID system info, e.g. "Adobe-Japan1", if any.Copyright © 2024. All rights reserved.