Yury Delendik
0787182e6f
Adds more characters to the PUA range
10 years ago
Rob Wu
2e63dcdcf5
Feature-test moz-chunked-arraybuffer before use
10 years ago
Yury Delendik
f3c3b1fc2d
Removes B2G preprocessing directives.
10 years ago
Jonas Jenwald
46a8485db4
Ignore paint form XObject when the name is missing (issue 4558)
...
Fixes 4558 (since the font issues already appear to be fixed).
10 years ago
Jonas Jenwald
bc865b9e2d
Ensure that we fetch all indirect objects (i.e. |Ref|s) in ColorSpace_parseToIR
...
Recently I've landed a number patches which fixed issues with ColorSpaces. In most of these cases the cause of the failures were, either partially or entirely, related to the fact that we didn't resolve indirect objects (i.e. the code was missing `xref.fetchIfRef(...)`).
The purpose of this patch is to fix the few remaining cases where indirect objects *could* potentially cause failures.
Given that we have seen how this causes failures in practice, I thus think that it makes sense to try and avoid further issues, instead of waiting for users to file even more bugs for this part of the code-base.
10 years ago
Jonas Jenwald
aa3a64e975
Skip mapping of CIDFontType2 glyphs when the font either has a |IdentityToUnicodeMap| or a |toUnicodeMap| with 65536 elements (issue 5677)
...
This patch slightly extends the heuristics used when trying to skip mapping of missing glyphs.
Fixes 5677.
10 years ago
Tim van der Meij
9550c00184
Transform old implementation to new implementation of border styles
10 years ago
Tim van der Meij
9ba4f74370
Implement setBorderStyle for annotations
10 years ago
Tim van der Meij
88b2059ed9
Implement annotation border style class and constants
10 years ago
Jonas Jenwald
60fbb5ef69
Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
...
Fixes 6113.
10 years ago
Jonas Jenwald
bc5e43b45c
Use the Alternate entry, if it exists, in ICCBased Colour Space dictionaries (issue 5836, issue 5939, issue 6055)
...
Fixes 5836.
Fixes 5939.
Fixes 6055.
10 years ago
Jonas Jenwald
5eae3e29c5
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
...
Fixes 6068.
The most notable issue with the font in question is that the `differences` array contains lots of strange entries (of the type `uniXXXX`, instead of proper glyph names).
10 years ago
Jonas Jenwald
6f2f0700b7
Don't map glyphs to certain problematic Thai/Lao Unicode locations (issue 5994)
...
*This patch depends on PR 5990.*
According to https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#38 , certain Thai/Lao characters are treated as special by the font shaping code in Firefox.
Further down in that file, https://dxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/hb-ot-shape-fallback.cc#216 , the vertical position of glyphs is modified, which should thus explain why some glyphs end up in the wrong position in the PDF file.
Fixes 5994.
10 years ago
Jonas Jenwald
64e1fb99fe
Fetch parameters if they are |Ref|s in Pattern color spaces (issue 6081)
...
Fixes 6081.
10 years ago
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
a1743d9952
Revert PR 6024 "[Firefox] Parse all JPEG images in the addon", since it's fixed upstream
10 years ago
Mike Corbin
4c9b65f0e1
Extract correct PDF format version from the catalog
...
The 'Version' field of the most recent document catalog, if present, is
intended to supersede the value in the file prologue.
This is significant for incrementally-built PDF documents and generators that
emit a low version in the prologue and later apply a format version based on
PDF features used, such as Apple's CoreGraphics/Quartz PDF backend.
Fixes the internal version variable, as well as the PDFFormatVersion reported
by the API and consumed by viewers.
10 years ago
Jonas Jenwald
dd4fc29cbc
[Firefox] Parse all JPEG images in the addon
...
Workaround for:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1164199 .
- https://github.com/mozilla/pdf.js/issues/6017 .
10 years ago
Jonas Jenwald
6fbc5428bd
Skip mapping of CIDFontType2 glyphs in fonts with a |IdentityToUnicodeMap|, unless |properties.widths| is defined for the glyph
...
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1142033 .
Also fixes issue 5874.
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
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
Jonas Jenwald
70b839386a
Ensure that the cmap position is within the bounds of the font file in |readCmapTable|
10 years ago
Fabian Lange
c2013094e7
Apply char spacing only when there are chars.
10 years ago
Martin Heller
a61a4b18cc
URL annotations handled as UTF-8 to accommodate some bad PDFs. For proper 7-bit ASCII this makes no difference. Fixes Bug 1122280.
10 years ago
Tim van der Meij
0c84899c0a
Revert #5603 regarding Chrome range request bug
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
7c7d05e7a3
Attempt to infer if a CMap file actually contains just a standard `Identity-H`/`Identity-V` map
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
Marco Castelluccio
1bd952f897
Use Int32Array instead of Uint32Array in FlateStream
10 years ago
Thomas Leitner
3ebc85e55f
Crypt filter EFF key should have StmF value as default, not StrF
...
This fixes the problem.
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
a54ec673c5
Move the checks for problematic Unicode locations from |adjustMapping| to a separate helper function
10 years ago
Levi Melamed
a5159a7942
extract more accurate glpyh heights from type-3 fonts
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
4a9ff471c4
Correctly detect the presence of the Adobe specific APP14 JPEG marker (bug 1140761)
...
According to the specification, http://partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf#G3.851943 , the content of the marker segment should begin with `Adobe`, and not `Adobe\x00` as the code currently look for.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1140761 .
Fixes the colour conversion part of issues 4090 and 5623.
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
888cbe0bde
Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644)
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
Collin Anderson
54e984c763
cleaned whitespace
10 years ago
Hengjie
109d67691c
Lower threshold
...
Fixes text selection formatting with https://github.com/vortext/vortext/blob/master/resources/public/examples/TestDocument3.pdf
10 years ago
Jonas Jenwald
3651c9e1f7
Skip fill bytes (0xFF) when decoding JPEG images (issue 5331)
10 years ago
Tim van der Meij
27e3558a41
Fix CCITTStream regression by byte-aligning rows before checking EOL marker
10 years ago
Jonas Jenwald
592890a758
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
10 years ago
Jonas Jenwald
f19a1db414
Create a IdentityToUnicodeMap in evaluator.js when toUnicode contains IdentityH/IdentityV
...
Currently if a font contains a `toUnicode` entry, we always create a new `ToUnicodeMap` in evaluator.js. This is done even for `IdentityV/IdentityH`, despite to possibility to use the much more compact `IdentityToUnicodeMap` representation.
This patch refactors the `IdentityH/IdentityV` cases, to:
- Avoid calling `IdentityCMap.getMap`, since this prevents allocating and iterating through an array with 65536 elements.
- Ensure that the handling of `toUnicode` is actually correct in fonts.js.
We rely on `toUnicode instanceof IdentityToUnicodeMap` in a few places, and currently this does not work correctly for `IdentityH/IdentityV`.
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