Skip to content

Commit a1d8ac8

Browse files
BlackEgoistiText-CI
authored andcommitted
Make substitutional addFont method for addCalligraphFonts
1 parent 395d61c commit a1d8ac8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/com/itextpdf/html2pdf/resolver/font/DefaultFontProvider.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ protected Range addCalligraphFonts() {
161161
Method m = klass.getMethod(methodName);
162162
ArrayList<byte[]> fontStreams = (ArrayList<byte[]>) m.invoke(null, null);
163163
for (byte[] font : fontStreams)
164-
addFont(font);
164+
addFontToList(font);
165165
// here we return a unicode range that excludes the loaded from the calligraph module fonts
166166
// i.e. the unicode range that is to be rendered with standard or shipped free fonts
167167
return FREE_FONT_RANGE;
@@ -177,9 +177,7 @@ private static Class<?> getTypographyUtilsClass() throws ClassNotFoundException
177177
return Class.forName(typographyClassFullName);
178178
}
179179

180-
@Override
181-
public boolean addFont(byte[] fontData) {
180+
private void addFontToList(byte[] fontData) {
182181
this.fontStreamList.add(fontData);
183-
return true;
184182
}
185183
}

0 commit comments

Comments
 (0)