File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
core/core-awt/src/main/java/org/icepdf/core/pobjects/fonts/zfont Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 4
4
import org .icepdf .core .pobjects .Name ;
5
5
import org .icepdf .core .pobjects .Reference ;
6
6
import org .icepdf .core .pobjects .Stream ;
7
+ import org .icepdf .core .pobjects .fonts .FontDescriptor ;
7
8
import org .icepdf .core .pobjects .fonts .zfont .cmap .CMap ;
8
9
import org .icepdf .core .util .Library ;
9
10
@@ -73,10 +74,17 @@ private void parseDescendantFont() {
73
74
Object descendantFontObject = descendantFonts .get (0 );
74
75
if (descendantFontObject instanceof Reference ) {
75
76
Reference descendantFontReference = (Reference ) descendantFontObject ;
76
- descendantFont = (CompositeFont ) library .getObject (descendantFontReference );
77
- } else if (descendantFontObject instanceof CompositeFont ) {
77
+ descendantFontObject = library .getObject (descendantFontReference );
78
+ }
79
+
80
+ if (descendantFontObject instanceof CompositeFont ) {
78
81
descendantFont = (CompositeFont ) descendantFontObject ;
79
82
}
83
+ // strange malformed PDFe where the descendant font is a font descriptor,
84
+ else if (descendantFontObject instanceof FontDescriptor ) {
85
+ fontDescriptor = (FontDescriptor ) descendantFontObject ;
86
+ parseFontDescriptor ();
87
+ }
80
88
81
89
if (descendantFont != null ) {
82
90
descendantFont .init ();
You can’t perform that action at this time.
0 commit comments