public class PdfBoxFontResolver extends Object implements FontResolver
| Modifier and Type | Class and Description |
|---|---|
static class |
PdfBoxFontResolver.FontDescription |
| Constructor and Description |
|---|
PdfBoxFontResolver(SharedContext sharedContext,
org.apache.pdfbox.pdmodel.PDDocument doc) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFont(File fontFile,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
Add a font using a existing file.
|
void |
addFont(FSSupplier<InputStream> supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
Add a font using a InputStream.
|
void |
addFontCollection(File file,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
Add fonts using a .ttc TrueTypeCollection
|
void |
addFontCollection(FSSupplier<InputStream> supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
Add fonts using a .ttc TrueTypeCollection
|
void |
addFontDirectory(String dir,
boolean embedded)
Add all fonts in the given directory
|
void |
flushCache()
Deprecated.
|
void |
flushFontFaceFonts()
Deprecated.
|
protected static String |
getHashName(String name,
IdentValue weight,
IdentValue style) |
void |
importFontFaces(List<FontFaceRule> fontFaces) |
FSFont |
resolveFont(SharedContext renderingContext,
FontSpecification spec) |
public PdfBoxFontResolver(SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc)
public FSFont resolveFont(SharedContext renderingContext, FontSpecification spec)
resolveFont in interface FontResolver@Deprecated public void flushCache()
flushCache in interface FontResolver@Deprecated public void flushFontFaceFonts()
public void importFontFaces(List<FontFaceRule> fontFaces)
public void addFontDirectory(String dir, boolean embedded) throws IOException
IOExceptionpublic void addFontCollection(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) throws IOException
IOExceptionpublic void addFontCollection(File file, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) throws IOException
IOExceptionpublic void addFont(File fontFile, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) throws IOException
IOExceptionpublic void addFont(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
addFontCollection(FSSupplier, String, Integer, IdentValue, boolean)protected static String getHashName(String name, IdentValue weight, IdentValue style)
Copyright © 2018. All rights reserved.