File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3661,8 +3661,24 @@ class PartialEvaluator {
36613661 if ( baseEncodingName ) {
36623662 properties . defaultEncoding = getEncoding ( baseEncodingName ) ;
36633663 } else {
3664- const isSymbolicFont = ! ! ( properties . flags & FontFlags . Symbolic ) ;
3664+ let isSymbolicFont = ! ! ( properties . flags & FontFlags . Symbolic ) ;
36653665 const isNonsymbolicFont = ! ! ( properties . flags & FontFlags . Nonsymbolic ) ;
3666+
3667+ // The PDF specs state that the flags Symbolic and Nonsymbolic must be
3668+ // mutually exclusive. However, some fonts are marked as both.
3669+ // In that case we ignore the Symbolic flag when there is a Differences
3670+ // entry (which indicates that the font is used as a non-symbolic
3671+ // font).
3672+ if (
3673+ properties . type === "TrueType" &&
3674+ isSymbolicFont &&
3675+ isNonsymbolicFont &&
3676+ differences . length !== 0
3677+ ) {
3678+ properties . flags &= ~ FontFlags . Symbolic ;
3679+ isSymbolicFont = false ;
3680+ }
3681+
36663682 // According to "Table 114" in section "9.6.6.1 General" (under
36673683 // "9.6.6 Character Encoding") of the PDF specification, a Nonsymbolic
36683684 // font should use the `StandardEncoding` if no encoding is specified.
Original file line number Diff line number Diff line change 743743! tracemonkey_with_editable_annotations.pdf
744744! bug1980958.pdf
745745! tracemonkey_annotation_on_page_8.pdf
746+ ! issue20232.pdf
Original file line number Diff line number Diff line change 1302813028 "md5" : " ae4f643ee9bb0fd725277a9d1e0fb1df" ,
1302913029 "rounds" : 1 ,
1303013030 "type" : " load"
13031+ },
13032+ {
13033+ "id" : " issue20232" ,
13034+ "file" : " pdfs/issue20232.pdf" ,
13035+ "md5" : " cc53e96a8fd9eafbfbb74de564f37047" ,
13036+ "rounds" : 1 ,
13037+ "type" : " eq"
1303113038 }
1303213039]
You can’t perform that action at this time.
0 commit comments