Skip to content

Commit f6cdc58

Browse files
SnipxiText-CI
authored andcommitted
Allow overriding default font family easier for BasicFontProvider
DEVSIX-3353
1 parent ed6b5b9 commit f6cdc58

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

styled-xml-parser/src/main/java/com/itextpdf/styledxmlparser/resolver/font/BasicFontProvider.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,18 @@ public BasicFontProvider() {
6666
* @param registerSystemFonts use true if you want to register the system fonts (can require quite some resources)
6767
*/
6868
public BasicFontProvider(boolean registerStandardPdfFonts, boolean registerSystemFonts) {
69-
super(DEFAULT_FONT_FAMILY);
69+
this(registerStandardPdfFonts, registerSystemFonts, DEFAULT_FONT_FAMILY);
70+
}
71+
72+
/**
73+
* Creates a new {@link BasicFontProvider} instance.
74+
*
75+
* @param registerStandardPdfFonts use true if you want to register the standard Type 1 fonts (can't be embedded)
76+
* @param registerSystemFonts use true if you want to register the system fonts (can require quite some resources)
77+
* @param defaultFontFamily default font family
78+
*/
79+
public BasicFontProvider(boolean registerStandardPdfFonts, boolean registerSystemFonts, String defaultFontFamily) {
80+
super(defaultFontFamily);
7081
if (registerStandardPdfFonts) {
7182
addStandardPdfFonts();
7283
}

0 commit comments

Comments
 (0)