You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2025/02/25 04:51:53 UTC
svn commit: r1924030 - /pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane/Type3Font.java
Author: tilman
Date: Tue Feb 25 04:51:53 2025
New Revision: 1924030
URL: http://svn.apache.org/viewvc?rev=1924030&view=rev
Log:
PDFBOX-2941, PDFBOX-5963: find another font name if null
Modified:
pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane/Type3Font.java
Modified: pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane/Type3Font.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane/Type3Font.java?rev=1924030&r1=1924029&r2=1924030&view=diff
==============================================================================
--- pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane/Type3Font.java (original)
+++ pdfbox/branches/2.0/debugger/src/main/java/org/apache/pdfbox/debugger/fontencodingpane/Type3Font.java Tue Feb 25 04:51:53 2025
@@ -63,7 +63,12 @@ class Type3Font extends FontPane
Object[][] tableData = getGlyphs(font);
Map<String, String> attributes = new LinkedHashMap<String, String>();
- attributes.put("Font", font.getName());
+ String name = font.getName();
+ if (name == null && font.getFontDescriptor() != null)
+ {
+ name = font.getFontDescriptor().getFontName();
+ }
+ attributes.put("Font", name);
attributes.put("Encoding", getEncodingName(font));
attributes.put("Glyphs", Integer.toString(totalAvailableGlyph));