@@ -67,6 +67,8 @@ public class DefaultFontProvider extends BasicFontProvider {
6767 */
6868 private static final org .slf4j .Logger LOGGER = LoggerFactory .getLogger (DefaultFontProvider .class );
6969
70+ private static final String DEFAULT_FONT_FAMILY = "Times" ;
71+
7072 /** The path to the shipped fonts. */
7173 private static final String SHIPPED_FONT_RESOURCE_PATH = "com/itextpdf/html2pdf/font/" ;
7274
@@ -114,7 +116,19 @@ public DefaultFontProvider() {
114116 * @param registerSystemFonts use true if you want to register the system fonts (can require quite some resources)
115117 */
116118 public DefaultFontProvider (boolean registerStandardPdfFonts , boolean registerShippedFreeFonts , boolean registerSystemFonts ) {
117- super (registerStandardPdfFonts , registerSystemFonts );
119+ this (registerStandardPdfFonts , registerShippedFreeFonts , registerSystemFonts , DEFAULT_FONT_FAMILY );
120+ }
121+
122+ /**
123+ * Creates a new {@link DefaultFontProvider} instance.
124+ *
125+ * @param registerStandardPdfFonts use true if you want to register the standard Type 1 fonts (can't be embedded)
126+ * @param registerShippedFreeFonts use true if you want to register the shipped fonts (can be embedded)
127+ * @param registerSystemFonts use true if you want to register the system fonts (can require quite some resources)
128+ * @param defaultFontFamily default font family
129+ */
130+ public DefaultFontProvider (boolean registerStandardPdfFonts , boolean registerShippedFreeFonts , boolean registerSystemFonts , String defaultFontFamily ) {
131+ super (registerStandardPdfFonts , registerSystemFonts , defaultFontFamily );
118132 if (registerShippedFreeFonts ) {
119133 addAllAvailableFonts (addCalligraphFonts ());
120134 }
0 commit comments