Jonas Jenwald
a28ed7c834
Always traverse the entire parent chain in Page_getInheritedPageProp (issue 5954)
...
This enables us to find resources placed on multiple levels of the tree.
Fixes 5954.
10 years ago
Jonas Jenwald
44240798be
Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)
...
For passwords where the encoding already is correct, the conversion is a no-op.
Also, since `encodeURIComponent` might throw, we need to make sure that we handle that case too.
Fixes 6010.
10 years ago
Jonas Jenwald
9788ba0270
Add a reduced test-case for issue 5896
...
This should have been part of PR 5898.
10 years ago
Jonas Jenwald
0365baf5ab
Fall back to the |defaultEncoding| when no valid "post" table is found in TrueType fonts (bug 1050040)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1050040 .
With this patch the file is completely readable, but given that the font is broken enough to be rejected by OTS the rendering differs slightly from Adobe Reader.
*Note:* the PDF file is sufficiently broken that even Adobe Reader complains about the font, *and* also about another more general issue.
10 years ago
Fabian Lange
c2013094e7
Apply char spacing only when there are chars.
10 years ago
Jonas Jenwald
760222cf0b
Handle the Encoding being a dictionary in PartialEvaluator_preEvaluateFont (bug 1157493)
...
*This is a regression from PR 4423.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1157493 .
10 years ago
Jonas Jenwald
4a022bc40a
Add a reduced test-case for issue 5801
10 years ago
Jordan Thoms
d0ea772fc6
Fix error reading concatenated pdfs
10 years ago
Jonas Jenwald
4c2ad3bc7b
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
...
This patch is yet another installment in the (never ending) series of bugs in PDF files with non-embedded fonts.
Fixes http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf .
10 years ago
Jonas Jenwald
fda858ae33
Don't map glyphs to certain problematic General Punctuation Unicode locations (bug 911034)
...
Fixes the remaining missing characters in https://bugzilla.mozilla.org/show_bug.cgi?id=911034 .
For reference, see http://www.unicode.org/charts/PDF/U2000.pdf (and also http://en.wikipedia.org/wiki/General_Punctuation_%28Unicode_block%29 ).
10 years ago
Jonas Jenwald
2b1a13ba28
Don't map glyphs to Unicode position 0x0E33, i.e. Thai character SARA AM (bug1046314)
...
*A similar approach as in PR 5705.*
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1046314 .
According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-complex-thai.cc#270-365 , `0x0E33` is treated as a special case (by the font shaping code in Firefox). Hence it seems reasonable to skip it when adjusting the font mapping.
10 years ago
Jonas Jenwald
e894a0a4c6
Guess CIDFontType0 subtype based on font file contents (issue 5751)
10 years ago
Jonas Jenwald
97eb215b5f
Add a reduced test-case for issue 5734
10 years ago
Jonas Jenwald
f81fc9091a
Correctly detect OpenType font files with CFF data
...
Fixes 5334.
Fixes 215.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1125614 .
According to the specification, http://www.microsoft.com/typography/otspec/otff.htm , OpenType font files with CFF data should have `OTTO` in the header.
10 years ago
Jonas Jenwald
0a3341dadc
Don't map glyphs to Unicode "Dotted circle" combining mark (bug 1108301)
...
It seems that `0x25CC` is another bad spot for charCodes.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1108301 .
10 years ago
Jonas Jenwald
7c8996558a
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
10 years ago
Jonas Jenwald
417800a1b5
Only skip the |!isSymbolicFont| check for TrueType (3, 1) cmap tables if no previous cmap table was found (PR 5703 followup)
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=894572 .
10 years ago
Jonas Jenwald
592890a758
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
10 years ago
Tim van der Meij
d124fc5e08
Test case for issue 5567
10 years ago
Jonas Jenwald
01e6565dd4
Try to skip mapping of missing TrueType glyphs
...
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
10 years ago
Jonas Jenwald
8174da61fb
Don't skip mapping of glyphs for CIDFontType2 fonts with a CIDToGIDMap
...
Also don't skip mapping of glyphs which are empty, if the corresponding charCode is included in toUnicode.
10 years ago
Jonas Jenwald
ad41a2d574
Add support for TrueType (0, 0) cmap tables (issue 5501 and 5574)
10 years ago
Jonas Jenwald
1fea44ce14
Ensure that |get fingerprint| doesn't fail if the ID is not an array (issue 5599)
...
According to the [PDF specification](http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#page=51 ) the `ID` should be an array. To prevent errors if the PDF file violates that part of the spec, check that the `ID` is actually an array.
Fixes 5599.
10 years ago
Jonas Jenwald
75767abb09
Add a reduced test case for issue 4379
...
This should have been part of PR 5136.
Based on comments https://github.com/mozilla/pdf.js/issues/4379#issuecomment-51221787 and https://github.com/mozilla/pdf.js/issues/4379#issuecomment-51475463 , it should be OK to include the PDF file in the repo.
10 years ago
Jonas Jenwald
d8b905048b
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 .
11 years ago
Tim van der Meij
a340927687
Test case for issue 5481
11 years ago
Tim van der Meij
36fce7db7e
Test case for issue 5475
11 years ago
Tim van der Meij
16833159a9
Test case for issue 5549
11 years ago
Jonas Jenwald
5f32f80e34
Add a reduced test case for issue 5470
11 years ago
Jonas Jenwald
58cc39f329
Add a reduced test case for issue 5291
11 years ago
Jonas Jenwald
88c88d08e1
Add a reduced test case for PR 5286
11 years ago
Jonas Jenwald
4ac4d49158
Avoid rendering invisible Type3 fonts (issue 5421)
11 years ago
Jonas Jenwald
0ffb54b95f
Add a reduced test case for bug 847420
11 years ago
Jonas Jenwald
df2a4afd36
Use |toUnicode| when creating the glyph map for standard CIDFontType2 fonts without embedded font file
11 years ago
Jonas Jenwald
3c759e296a
Add support for MMType1 fonts with embedded font files
11 years ago
Jonas Jenwald
b16c973d9d
Fix Symbol fonts without font file but with Encoding dictionary (issue 5238)
11 years ago
Yury Delendik
aa8d3d98f8
Fetches params in makeFilter
11 years ago
Jonas Jenwald
3ca2c3f4a7
Add ZapfDingbats testcase
11 years ago
Jonas Jenwald
be595d0721
Further amend GlyphMapForStandardFonts (issue 5244)
11 years ago
Yury Delendik
be998261cc
Fixes Type3 negative font direction
11 years ago
Jonas Jenwald
8ecbb4da05
Adjust the heuristics to recognize more cases of unknown glyphs for |toUnicode| (issue 5070)
11 years ago
Jonas Jenwald
70b934c7a5
Add reduced test-cases for issues 4875 and 4881
11 years ago
Jonas Jenwald
26f5b1b2d3
Add a couple of reduced test-cases for PR 4259
...
PR 4259 fixed a large number of font bugs, but none of those where added as test-cases. This was, in my opinion, unfortunate since it increases the risk of regressions in the future when other font bugs are fixed.
This PR simply adds a few more test-cases, to improve our test coverage somewhat.
11 years ago
Jonas Jenwald
50eeff2fab
Add a reduced test-case for issue 4800
11 years ago
Jonas Jenwald
e5f249605c
Add a reduced test-case for bug 1027533
11 years ago
Jonas Jenwald
2485f11829
Fix loading of PDF files with invalid or missing Type3 characters (issue 5039)
11 years ago
Jonas Jenwald
f13c217b25
Fix another seac regression (issue 4801)
11 years ago
Jonas Jenwald
a7c786775d
[CIDFontType2] Map characters missing in toUnicode to the private use area (bug 1028735 and issue 4881)
11 years ago
Jonas Jenwald
04975acceb
Prevent CMapFactory.create from failing by passing the necessary parameters from PartialEvaluator_readToUnicode (issue 5010)
11 years ago
Jonas Jenwald
158790981c
Don't blindly trust toUnicode when building toFontChar for non-standard fonts without a font file (issue 4934)
11 years ago