Class MainFontStore
- java.lang.Object
-
- com.openhtmltopdf.pdfboxout.fontstore.AbstractFontStore
-
- com.openhtmltopdf.pdfboxout.fontstore.MainFontStore
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class MainFontStore extends AbstractFontStore implements Closeable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openhtmltopdf.pdfboxout.fontstore.AbstractFontStore
AbstractFontStore.BuiltinFontStore, AbstractFontStore.EmptyFontStore
-
-
Constructor Summary
Constructors Constructor Description MainFontStore(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)
Add fonts using a FontBox TrueTypeCollection.void
addFontFaceFont(String fontFamilyName, IdentValue fontWeight, IdentValue fontStyle, String uri, 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()
PdfBoxFontResolver.FontDescription
resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant)
-
-
-
Constructor Detail
-
MainFontStore
public MainFontStore(SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc, FSCacheEx<String,FSCacheValue> pdfMetricsCache)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
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
-
addFontCollection
public void addFontCollection(org.apache.fontbox.ttf.TrueTypeCollection collection, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) throws IOException
Add fonts using a FontBox TrueTypeCollection.- Throws:
IOException
-
addFontFaceFont
public void addFontFaceFont(String fontFamilyName, IdentValue fontWeight, IdentValue fontStyle, String uri, boolean subset)
-
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)
-
resolveFont
public PdfBoxFontResolver.FontDescription resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant)
- Specified by:
resolveFont
in classAbstractFontStore
-
-