Skip to content

Commit b35a24b

Browse files
ars18wrwpavel-alay
authored andcommitted
Update BasicFontProvider to make it an usable equivalent of FontProvider.
DEVSIX-2050
1 parent c8b8dce commit b35a24b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/main/java/com/itextpdf/styledxmlparser/resolver/font/BasicFontProvider.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ This file is part of the iText (R) project.
4343
package com.itextpdf.styledxmlparser.resolver.font;
4444

4545
import com.itextpdf.layout.font.FontProvider;
46+
import com.itextpdf.layout.font.FontSet;
4647

4748
/**
4849
* A basic {@link FontProvider} that allows configuring in the constructor which fonts are loaded by default.
@@ -62,7 +63,7 @@ public BasicFontProvider() {
6263
* Creates a new {@link BasicFontProvider} instance.
6364
*
6465
* @param registerStandardPdfFonts use true if you want to register the standard Type 1 fonts (can't be embedded)
65-
* @param registerSystemFonts use true if you want to register the system fonts (can require quite some resources)
66+
* @param registerSystemFonts use true if you want to register the system fonts (can require quite some resources)
6667
*/
6768
public BasicFontProvider(boolean registerStandardPdfFonts, boolean registerSystemFonts) {
6869
super(DEFAULT_FONT_FAMILY);
@@ -73,4 +74,14 @@ public BasicFontProvider(boolean registerStandardPdfFonts, boolean registerSyste
7374
addSystemFonts();
7475
}
7576
}
77+
78+
/**
79+
* Creates a new {@link BasicFontProvider} instance.
80+
*
81+
* @param fontSet predefined set of fonts, could be null.
82+
* @param defaultFontFamily default font family.
83+
*/
84+
public BasicFontProvider(FontSet fontSet, String defaultFontFamily) {
85+
super(fontSet, defaultFontFamily);
86+
}
7687
}

0 commit comments

Comments
 (0)