Class FallbackFontStore
- java.lang.Object
-
- com.openhtmltopdf.pdfboxout.fontstore.FallbackFontStore
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class FallbackFontStore extends Object implements Closeable
-
-
Constructor Summary
Constructors Constructor Description FallbackFontStore(SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc, FSCacheEx<String,FSCacheValue> pdfMetricsCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFont(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
void
addFont(PDFontSupplier supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
void
addFontCollection(org.apache.fontbox.ttf.TrueTypeCollection collection, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
void
addFontLazy(FSSupplier<org.apache.pdfbox.pdmodel.font.PDFont> font, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
Add a font with a lazy loaded PDFontvoid
close()
List<PdfBoxFontResolver.FontDescription>
resolveFonts(SharedContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant)
-
-
-
Constructor Detail
-
FallbackFontStore
public FallbackFontStore(SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc, FSCacheEx<String,FSCacheValue> pdfMetricsCache)
-
-
Method Detail
-
resolveFonts
public List<PdfBoxFontResolver.FontDescription> resolveFonts(SharedContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant)
-
addFont
public void addFont(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
-
addFont
public void addFont(PDFontSupplier supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
-
addFontLazy
public void addFontLazy(FSSupplier<org.apache.pdfbox.pdmodel.font.PDFont> font, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset)
Add a font with a lazy loaded PDFont
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
addFontCollection
public void addFontCollection(org.apache.fontbox.ttf.TrueTypeCollection collection, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) throws IOException
- Throws:
IOException
-
-