Skip to content

Commit 7b49fb7

Browse files
committed
Make addCalligraphFonts protected, add javadoc
DEVSIX-2345
1 parent 6474261 commit 7b49fb7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,18 @@ private void addShippedFreeFonts(Range rangeToLoad) {
127127
}
128128
}
129129

130-
private Range addCalligraphFonts() {
130+
/**
131+
* This method loads a list of noto fonts from pdfCalligraph (if present in the classpath!) into FontProvider.
132+
* The list is the following (each font is represented in regular and bold types): NotoSansArabic, NotoSansGurmukhi,
133+
* NotoSansOriya, NotoSerifBengali, NotoSerifDevanagari, NotoSerifGujarati, NotoSerifHebrew, NotoSerifKannada,
134+
* NotoSerifKhmer, NotoSerifMalayalam, NotoSerifTamil, NotoSerifTelugu, NotoSerifThai.
135+
* If it's needed to have a DefaultFontProvider without typography fonts loaded,
136+
* create an extension of DefaultFontProvider and override this method so it does nothing and only returns null.
137+
*
138+
* @return a unicode {@link Range} that excludes the loaded from pdfCalligraph fonts,
139+
* i.e. the unicode range that is to be rendered with any other font contained in this FontProvider
140+
*/
141+
protected Range addCalligraphFonts() {
131142
String methodName = "loadShippedFonts";
132143
Class<?> klass = null;
133144
try {

0 commit comments

Comments
 (0)