mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Add fallback for non-embedded "Century Gothic" CIDFontType2 font (issue 4722 and bug 879561)
According to practical experiments, falling back to "Helvetica" when we encounter a non-embedded "[Century Gothic](http://en.wikipedia.org/wiki/Century_Gothic)" `CIDFontType2` font seems to work well. (Also, the section on Wikipedia about "Printer ink usage" *might* provide some anecdotal evidence that Century Gothic is a fairly standard sans-serif font.) Obviously this patch doesn't make "Century Gothic" fonts render perfectly, as is often the case with non-embedded fonts, but all the text is now legible in the referenced issues. Fixes 4722. Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=879561.
This commit is contained in:
parent
a018e933ea
commit
d8b905048b
4 changed files with 127 additions and 1 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -101,6 +101,7 @@
|
|||
!issue4246.pdf
|
||||
!issue4461.pdf
|
||||
!issue4573.pdf
|
||||
!issue4722.pdf
|
||||
!issue4800.pdf
|
||||
!issue4801.pdf
|
||||
!issue5549.pdf
|
||||
|
|
110
test/pdfs/issue4722.pdf
Normal file
110
test/pdfs/issue4722.pdf
Normal file
|
@ -0,0 +1,110 @@
|
|||
%PDF-1.7
|
||||
%âãÏÓ
|
||||
1 0 obj
|
||||
<<
|
||||
/Supplement 0
|
||||
/Registry (Adobe)
|
||||
/Ordering (Identity)
|
||||
>>
|
||||
endobj
|
||||
2 0 obj
|
||||
<<
|
||||
/FontName /CenturyGothic,Bold
|
||||
/StemV 132
|
||||
/Ascent 1122
|
||||
/Flags 4
|
||||
/FontWeight 700
|
||||
/XHeight 531
|
||||
/FontFamily (Century Gothic)
|
||||
/FontStretch /Normal
|
||||
/Descent -307
|
||||
/ItalicAngle 0
|
||||
/FontBBox [-115 -307 1260 1122]
|
||||
/Type /FontDescriptor
|
||||
/CapHeight 718
|
||||
>>
|
||||
endobj
|
||||
3 0 obj
|
||||
<<
|
||||
/BaseFont /CenturyGothic,Bold
|
||||
/Subtype /CIDFontType2
|
||||
/DW 1000
|
||||
/CIDSystemInfo 1 0 R
|
||||
/FontDescriptor 2 0 R
|
||||
/W [3 [280] 17 [280] 36 [740 580 780 700 520] 44 [280] 48 [900 740 840 560 840 580 520 420 640] 60 [620]]
|
||||
/Type /Font
|
||||
>>
|
||||
endobj
|
||||
4 0 obj [3 0 R]
|
||||
endobj
|
||||
5 0 obj
|
||||
<<
|
||||
/Pages 6 0 R
|
||||
/Type /Catalog
|
||||
>>
|
||||
endobj
|
||||
6 0 obj
|
||||
<<
|
||||
/MediaBox [0 0 200 50]
|
||||
/Kids [7 0 R]
|
||||
/Count 1
|
||||
/Type /Pages
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
<<
|
||||
/Parent 6 0 R
|
||||
/MediaBox [0 0 200 50]
|
||||
/Resources
|
||||
<<
|
||||
/Font
|
||||
<<
|
||||
/F1 8 0 R
|
||||
>>
|
||||
>>
|
||||
/Contents 9 0 R
|
||||
/Type /Page
|
||||
>>
|
||||
endobj
|
||||
8 0 obj
|
||||
<<
|
||||
/DescendantFonts 4 0 R
|
||||
/BaseFont /CenturyGothic,Bold
|
||||
/Subtype /Type0
|
||||
/Type /Font
|
||||
/Encoding /Identity-H
|
||||
>>
|
||||
endobj
|
||||
9 0 obj
|
||||
<<
|
||||
/Length 74
|
||||
>>
|
||||
stream
|
||||
BT
|
||||
10 20 TD
|
||||
/F1 20 Tf
|
||||
<00270028003600260035002C00330037002C00320031>Tj
|
||||
ET
|
||||
|
||||
endstream
|
||||
endobj xref
|
||||
0 10
|
||||
0000000000 65535 f
|
||||
0000000015 00000 n
|
||||
0000000091 00000 n
|
||||
0000000354 00000 n
|
||||
0000000600 00000 n
|
||||
0000000624 00000 n
|
||||
0000000675 00000 n
|
||||
0000000757 00000 n
|
||||
0000000886 00000 n
|
||||
0000001012 00000 n
|
||||
trailer
|
||||
|
||||
<<
|
||||
/Root 5 0 R
|
||||
/Size 10
|
||||
>>
|
||||
startxref
|
||||
1138
|
||||
%%EOF
|
|
@ -944,6 +944,13 @@
|
|||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue4722",
|
||||
"file": "pdfs/issue4722.pdf",
|
||||
"md5": "a42ca858af7d179358f92f47e57c0fed",
|
||||
"link": false,
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue4875",
|
||||
"file": "pdfs/issue4875.pdf",
|
||||
"md5": "9a558e18029a42c0ef4e9a8755e24733",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue