Skip to content

Commit 82f09e3

Browse files
committed
PDFBOX-2941, PDFBOX-5963: find another font name if null
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1924029 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3f6e1d8 commit 82f09e3

File tree

1 file changed

+6
-1
lines changed
  • debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane

1 file changed

+6
-1
lines changed

debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane/Type3Font.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ class Type3Font extends FontPane
6464
Object[][] tableData = getGlyphs(font);
6565

6666
Map<String, String> attributes = new LinkedHashMap<>();
67-
attributes.put("Font", font.getName());
67+
String name = font.getName();
68+
if (name == null && font.getFontDescriptor() != null)
69+
{
70+
name = font.getFontDescriptor().getFontName();
71+
}
72+
attributes.put("Font", name);
6873
attributes.put("Encoding", getEncodingName(font));
6974
attributes.put("Glyphs", Integer.toString(totalAvailableGlyph));
7075

0 commit comments

Comments
 (0)