Skip to content

Commit

Permalink
Update LayoutProcessor.java/ See #1159
Browse files Browse the repository at this point in the history
Load only TrueTypeFontUnicode fonts
See #1159
  • Loading branch information
vk-github18 authored and asturio committed Nov 25, 2024
1 parent 1e80997 commit d89bf2d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ public static boolean supportsFont(BaseFont baseFont) {

/**
* Loads the AWT font needed for layout
* <p>
* If baseFont is not instanceof TrueTypeFontUnicode *no* font is loaded.
*
* @param baseFont OpenPdf base font
* @param filename of the font file
Expand All @@ -279,7 +281,9 @@ public static void loadFont(BaseFont baseFont, String filename) {
if (!enabled || awtFontMap.get(baseFont) != null) {
return;
}

if (!(baseFont instanceof TrueTypeFontUnicode)) {
return;
}
java.awt.Font awtFont;
InputStream inputStream = null;
try {
Expand Down

0 comments on commit d89bf2d

Please sign in to comment.