public class PdfBoxFontResolver extends Object implements FontResolver, Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
PdfBoxFontResolver.FontDescription
A
FontDescription can exist in multiple states. |
static class |
PdfBoxFontResolver.FontGroup |
| Constructor and Description |
|---|
PdfBoxFontResolver(SharedContext sharedContext,
org.apache.pdfbox.pdmodel.PDDocument doc,
FSCacheEx<String,FSCacheValue> pdfMetricsCache,
PdfRendererBuilder.PdfAConformance pdfAConformance,
boolean pdfUaConform) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFont(File fontFile,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
Deprecated.
|
void |
addFont(File fontFile,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset,
PdfBoxFontResolver.FontGroup fontGroup)
Add a font file (truetype) to a specific font group.
|
void |
addFont(FSSupplier<InputStream> supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
|
void |
addFont(FSSupplier<InputStream> supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset,
PdfBoxFontResolver.FontGroup fontGroup)
Adds a font specified by an input stream (truetype) to a specific font group.
|
void |
addFont(PDFontSupplier supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
|
void |
addFont(PDFontSupplier supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset,
PdfBoxFontResolver.FontGroup fontGroup)
Add a font specified by a PDFontSupplier to a specific font group.
|
void |
addFontCollection(File file,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
|
void |
addFontCollection(File file,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset,
PdfBoxFontResolver.FontGroup fontGroup)
Adds a font collection (.ttc file) to a specific group.
|
void |
addFontCollection(FSSupplier<InputStream> supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset)
|
void |
addFontCollection(FSSupplier<InputStream> supplier,
String fontFamilyNameOverride,
Integer fontWeightOverride,
IdentValue fontStyleOverride,
boolean subset,
PdfBoxFontResolver.FontGroup fontGroup)
Adds a font collection (.ttc in an input stream) to a
specific font group.
|
void |
addFontDirectory(String dir,
boolean embedded)
Deprecated.
|
void |
addFontDirectory(String dir,
boolean embedded,
PdfBoxFontResolver.FontGroup fontGroup)
Add all fonts in the given directory
|
void |
close()
Free all font resources (i.e.
|
void |
importFontFaces(List<FontFaceRule> fontFaces) |
FSFont |
resolveFont(SharedContext renderingContext,
FontSpecification spec) |
public PdfBoxFontResolver(SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc, FSCacheEx<String,FSCacheValue> pdfMetricsCache, PdfRendererBuilder.PdfAConformance pdfAConformance, boolean pdfUaConform)
public FSFont resolveFont(SharedContext renderingContext, FontSpecification spec)
resolveFont in interface FontResolverpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void importFontFaces(List<FontFaceRule> fontFaces)
@Deprecated public void addFontDirectory(String dir, boolean embedded) throws IOException
addFontDirectory(String, boolean, FontGroup)IOExceptionpublic void addFontDirectory(String dir, boolean embedded, PdfBoxFontResolver.FontGroup fontGroup) throws IOException
IOExceptionpublic void addFontCollection(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset, PdfBoxFontResolver.FontGroup fontGroup) throws IOException
IOException@Deprecated public 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, PdfBoxFontResolver.FontGroup fontGroup) throws IOException
IOException@Deprecated public 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, PdfBoxFontResolver.FontGroup fontGroup) throws IOException
IOException@Deprecated public void addFont(File fontFile, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) throws IOException
addFont(File, String, Integer, IdentValue, boolean, FontGroup)IOExceptionpublic void addFont(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset, PdfBoxFontResolver.FontGroup fontGroup)
@Deprecated public void addFont(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
addFontCollection(FSSupplier, String, Integer, IdentValue, boolean)public void addFont(PDFontSupplier supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset, PdfBoxFontResolver.FontGroup fontGroup)
@Deprecated public void addFont(PDFontSupplier supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
PDFontSupplier.Copyright © 2004–2025. All rights reserved.