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(com.openhtmltopdf.layout.SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc, com.openhtmltopdf.extend.FSCacheEx<String,com.openhtmltopdf.extend.FSCacheValue> pdfMetricsCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFont(com.openhtmltopdf.extend.FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, com.openhtmltopdf.css.constants.IdentValue fontStyleOverride, boolean subset)voidaddFont(PDFontSupplier supplier, String fontFamilyNameOverride, Integer fontWeightOverride, com.openhtmltopdf.css.constants.IdentValue fontStyleOverride, boolean subset)voidaddFontCollection(org.apache.fontbox.ttf.TrueTypeCollection collection, String fontFamilyNameOverride, Integer fontWeightOverride, com.openhtmltopdf.css.constants.IdentValue fontStyleOverride, boolean subset)Add fonts using a FontBox TrueTypeCollection.voidaddFontFaceFont(String fontFamilyName, com.openhtmltopdf.css.constants.IdentValue fontWeight, com.openhtmltopdf.css.constants.IdentValue fontStyle, String uri, boolean subset)voidaddFontLazy(com.openhtmltopdf.extend.FSSupplier<org.apache.pdfbox.pdmodel.font.PDFont> font, String fontFamilyNameOverride, Integer fontWeightOverride, com.openhtmltopdf.css.constants.IdentValue fontStyleOverride, boolean subset)Add a font with a lazy loaded PDFontvoidclose()PdfBoxFontResolver.FontDescriptionresolveFont(com.openhtmltopdf.layout.SharedContext ctx, String fontFamily, float size, com.openhtmltopdf.css.constants.IdentValue weight, com.openhtmltopdf.css.constants.IdentValue style, com.openhtmltopdf.css.constants.IdentValue variant)
-
-
-
Constructor Detail
-
MainFontStore
public MainFontStore(com.openhtmltopdf.layout.SharedContext sharedContext, org.apache.pdfbox.pdmodel.PDDocument doc, com.openhtmltopdf.extend.FSCacheEx<String,com.openhtmltopdf.extend.FSCacheValue> pdfMetricsCache)
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
addFontLazy
public void addFontLazy(com.openhtmltopdf.extend.FSSupplier<org.apache.pdfbox.pdmodel.font.PDFont> font, String fontFamilyNameOverride, Integer fontWeightOverride, com.openhtmltopdf.css.constants.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, com.openhtmltopdf.css.constants.IdentValue fontStyleOverride, boolean subset) throws IOExceptionAdd fonts using a FontBox TrueTypeCollection.- Throws:
IOException
-
addFontFaceFont
public void addFontFaceFont(String fontFamilyName, com.openhtmltopdf.css.constants.IdentValue fontWeight, com.openhtmltopdf.css.constants.IdentValue fontStyle, String uri, boolean subset)
-
addFont
public void addFont(com.openhtmltopdf.extend.FSSupplier<InputStream> supplier, String fontFamilyNameOverride, Integer fontWeightOverride, com.openhtmltopdf.css.constants.IdentValue fontStyleOverride, boolean subset)
-
addFont
public void addFont(PDFontSupplier supplier, String fontFamilyNameOverride, Integer fontWeightOverride, com.openhtmltopdf.css.constants.IdentValue fontStyleOverride, boolean subset)
-
resolveFont
public PdfBoxFontResolver.FontDescription resolveFont(com.openhtmltopdf.layout.SharedContext ctx, String fontFamily, float size, com.openhtmltopdf.css.constants.IdentValue weight, com.openhtmltopdf.css.constants.IdentValue style, com.openhtmltopdf.css.constants.IdentValue variant)
- Specified by:
resolveFontin classAbstractFontStore
-
-