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 1302013020 "md5" : " ae4f643ee9bb0fd725277a9d1e0fb1df" ,
1302113021 "rounds" : 1 ,
1302213022 "type" : " load"
13023+ },
13024+ {
13025+ "id" : " issue20232" ,
13026+ "file" : " pdfs/issue20232.pdf" ,
13027+ "md5" : " cc53e96a8fd9eafbfbb74de564f37047" ,
13028+ "rounds" : 1 ,
13029+ "type" : " eq"
1302313030 }
1302413031]
You can’t perform that action at this time.
0 commit comments