Class MainFontStore
java.lang.Object
com.openhtmltopdf.pdfboxout.fontstore.AbstractFontStore
com.openhtmltopdf.pdfboxout.fontstore.MainFontStore
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractFontStore
AbstractFontStore.BuiltinFontStore, AbstractFontStore.EmptyFontStore -
Constructor Summary
ConstructorsConstructorDescriptionMainFontStore(SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc, FSCacheEx<String, FSCacheValue> pdfMetricsCache) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFont(FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) voidaddFont(PDFontSupplier supplier, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) voidaddFontCollection(org.apache.fontbox.ttf.TrueTypeCollection collection, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) Add fonts using a FontBox TrueTypeCollection.voidaddFontFaceFont(String fontFamilyName, IdentValue fontWeight, IdentValue fontStyle, String uri, boolean subset) voidaddFontLazy(FSSupplier<org.apache.pdfbox.pdmodel.font.PDFont> font, String fontFamilyNameOverride, Integer fontWeightOverride, IdentValue fontStyleOverride, boolean subset) Add a font with a lazy loaded PDFontvoidclose()resolveFont(SharedContext ctx, String fontFamily, float size, IdentValue weight, IdentValue style, IdentValue variant)
-
Constructor Details
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein 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)
-