Commit Graph

1280 Commits

Author SHA1 Message Date
Jonas Jenwald
4b360512af Replace the unavailable linked test-case for PR 197 with a reduced test-case
Re: PR 197.

*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-11-15 20:07:54 +01:00
Jonas Jenwald
dca681e82b Replace the unavailable linked test-case for issue 1655 with a reduced test-case
Re: issue 1655 and PR 1978.
2015-11-15 15:32:11 +01:00
Jonas Jenwald
458aff66f4 Replace the unavailable linked test-case for issue 3207 with a reduced test-case
Re: issue 3207 and PR 3268.
2015-11-15 13:33:36 +01:00
Manas
a2ba1b8189 Uses editorconfig to maintain consistent coding styles
Removes the following as they unnecessary
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
2015-11-14 07:32:18 +05:30
Jonas Jenwald
5bd76c46ac Replace the unavailable linked test-case for issue 3263 with a reduced test-case
Re: issue 3263 and PR 3265.
2015-11-13 16:47:02 +01:00
Jonas Jenwald
50a70429ec Ignore the /Mask entry in images unless its /ImageMask entry is explicitly set to true (issue 6621)
Fixes 6621.
2015-11-12 22:49:26 +01:00
Tim van der Meij
3a23367f04 Merge pull request #6610 from Snuffleupagus/issue-2128-reduced-test
Replace the unavailable linked test-case for issue 2128 with a reduced test-case
2015-11-11 23:02:29 +01:00
Tim van der Meij
d8ddde26b7 Merge pull request #6622 from yurydelendik/rm-mc-tests
Remove mozcentral test files.
2015-11-11 22:57:40 +01:00
Yury Delendik
4c9f6741ae Remove mozcentral test files. 2015-11-11 15:54:17 -06:00
Yury Delendik
248e211a20 Merge pull request #6600 from Rob--W/test-server-improved
Improve reliability of the test server
2015-11-11 13:50:25 -06:00
Rob Wu
b0ff49e456 Improve reliability of the test server
- replace // with /
  (otherwise http://localhost:8888// links to e.g. http://src/ instead
   of http://localhost:8888/src).

- Solve XSS issue (file names should be sanitized, not output as-is).

- Prevent server from crashing if there is a stat error (e.g. permission
  error or file not found (e.g. broken symlink)).
2015-11-11 18:37:29 +01:00
Jonas Jenwald
3008580972 Replace the unavailable linked test-case for issue 2128 with a reduced test-case
Re: issue 2128 and PR 2628.
2015-11-11 12:49:42 +01:00
Yury Delendik
3674f0d7c7 Merge pull request #6620 from Rob--W/node-test-random-port
Use random port in test webserver
2015-11-10 13:13:01 -06:00
Rob Wu
ff8c334207 Use random port in test webserver 2015-11-10 19:10:23 +01:00
Jonas Jenwald
ff64ef0243 Prevent readCmapTable from failing if the cmap is missing in TrueType fonts
Fixes http://arrow.dit.ie/cgi/viewcontent.cgi?article=1000&context=aaschadpoth#page=3.
2015-11-08 16:48:37 +01:00
Jonas Jenwald
66c17a69ae Add a reduced text test-case for issue 4665
Re: issue 4665 and PR 6601.

Since we currently don't have a good `text` test-case that fails without the above PR, this patch adds a reduced one.
2015-11-07 13:09:08 +01:00
Yury Delendik
4ee0bade82 Test for text layer issue 1045. 2015-11-06 10:55:43 -06:00
Yury Delendik
7e8dacf57b Merge pull request #6588 from yurydelendik/spacing
Better spacing in text layer.
2015-11-03 09:24:43 -06:00
Yury Delendik
27efe5608f Test case from #6019. 2015-11-03 09:03:08 -06:00
Jonas Jenwald
034087bb40 Replace the linked test-case for issue 3879 with a reduced test-case
Re: issue 3879 and PR 3880.
2015-11-01 13:02:10 +01:00
Jonas Jenwald
cf09f38340 Replace the linked test-case for issue 1293 with a reduced test-case
When I submitted PR 3576, I included a linked test-case. The reason was that I didn't know enough about the PDF format, in order to successfully create a reduced test-case.
Considering that the link points to a Dropbox, there's no guarantee that the PDF file will remain available, hence it seems worthwhile to replace the test-case.

*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-10-29 13:39:29 +01:00
Jonas Jenwald
1c66d4a106 Add a totalLength getter to OperatorList, since the length is zero after flushing
In the `RenderPageRequest` handler in `worker.js`, we attempt to print an `info` message containing the rendering time and the length of the operator list. The latter is currently broken (and has been for quite some time), since the `length` of an `OperatorList` is reset when flushing occurs.
This patch attempts to rectify this, by adding a getter which keeps track of the total length.
2015-10-26 18:12:14 +01:00
Jonas Jenwald
25e55322c4 Improved get fingerprint unit-tests (PR 5124)
This patch adds a unit-test for the changes contained in PR 5124, and also improves the existing `get fingerprint` test slightly.
2015-10-24 14:18:36 +02:00
Yury Delendik
5111422d89 Merge pull request #6558 from Snuffleupagus/issue-6151-test
Add a reduced test-case for issue 6151
2015-10-23 14:45:57 -05:00
Brendan Dahl
2a5616c2aa Merge pull request #6546 from yurydelendik/destroy
[api-minor] Adds controlled destruction of the worker.
2015-10-23 10:54:01 -07:00
Jonas Jenwald
ec04c4acb7 Add a reduced test-case for issue 6151
Re: issue 6151 and PR 6193.

*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-10-23 18:50:14 +02:00
Yury Delendik
58c3ea0820 Adds thread abort capabilities. 2015-10-23 09:06:32 -05:00
Yury Delendik
59c13b32aa Adds destroy method to the document loading task.
Also renames PDFPageProxy.destroy method to cleanup.
2015-10-23 08:57:14 -05:00
Jonas Jenwald
d3782ff8d4 Add a reduced test-case for issue 4575
Re: issue 4575 and PR 4581.
2015-10-23 15:15:06 +02:00
Jonas Jenwald
2e751199fb Prevent getOperatorList from failing to correctly parse OPS.paintXObject for TilingPatterns that are missing some /Resources entries (issue 6541)
Fixes 6541.
2015-10-21 21:30:56 +02:00
Jonas Jenwald
e04113a35b Add unit-tests for the onPassword/onProgress callbacks of the API
The standard viewer implicitly depends on the `onPassword` and `onProgress` callbacks, in order to open password protected PDF files, respectively to report file loading progress. We currently have no unit-tests for this functionality, which seems unfortunate; hence this patch.

*Please note:* Rather than adding more unit-tests to `api_spec.js`, I slightly extended/reworked two existing tests. Specifically for the password test, this *does not* really change what we actually test, just how the test is done.
2015-10-21 00:01:52 +02:00
Jonas Jenwald
5987197bd5 Ensure that all getDocument unit-tests returns the expected data 2015-10-16 18:54:20 +02:00
Jonas Jenwald
34cbee9bd3 Add unit-tests for PR 6531 2015-10-16 18:54:18 +02:00
Jonas Jenwald
39b962e3b0 Add unit-tests for isExternalLinkTargetSet 2015-10-13 21:56:46 +02:00
Tim van der Meij
d89fde05b0 Merge pull request #6481 from Snuffleupagus/issue-4914-test
Add a (linked) test-case for issue 4914
2015-10-13 20:02:48 +02:00
Tim van der Meij
c4403e6fd2 Merge pull request #6434 from Snuffleupagus/issue-4436-reduced-test
Replace the unavailable linked test-case for issue 4436 with a reduced test-case
2015-10-13 00:32:05 +02:00
Brendan Dahl
3eaeacfe19 Merge pull request #6476 from Snuffleupagus/PartialEvaluator_readToUnicode-cmap-length
Right-size the `map` array in PartialEvaluator_readToUnicode
2015-10-09 10:31:28 -07:00
Jonas Jenwald
03f2c704a3 Add a reduced load test-case for bug 1020858
Re: PR 4907 and https://bugzilla.mozilla.org/show_bug.cgi?id=1020858.

*Note:* Since this is a `load` test, `makeref` won't be necessary.
2015-10-04 23:49:49 +02:00
Tim van der Meij
cd8bd73529 Merge pull request #6499 from Snuffleupagus/issue-4387-test
Add a (linked) load test for issue 4387
2015-10-04 16:50:18 +02:00
Tim van der Meij
1e29ddc4de Merge pull request #6500 from Snuffleupagus/pr-4897-test
Add a (linked) test-case for PR 4897
2015-10-04 16:26:57 +02:00
Tim van der Meij
5e4910f7b6 Merge pull request #6491 from Snuffleupagus/check-trailer-if-xref-missing
Make `XRef_indexObjects` even more robust against bad PDF files, by checking for the existence of 'trailer' if 'xref' is not found
2015-10-04 16:00:00 +02:00
Jonas Jenwald
e8ad6c9d13 Add a unit-test for bug 1020226
For reference, see PR 4902 and https://bugzilla.mozilla.org/show_bug.cgi?id=1020226.
2015-10-04 15:45:24 +02:00
Jonas Jenwald
ae255f8921 Slightly improved getPage unit-tests 2015-10-04 14:28:24 +02:00
Jonas Jenwald
bdfda37c04 Add a (linked) test-case for PR 4897
Re: PR 4897.
2015-10-04 13:54:05 +02:00
Jonas Jenwald
96b3dc127d Add a (linked) load test for issue 4387
Re: PR 4404 and issue 4387.
2015-10-04 13:15:10 +02:00
Jonas Jenwald
192907e0d2 Make XRef_indexObjects even more robust against bad PDF files, by checking for the existence of 'trailer' if 'xref' is not found
Fixes http://www.cyjack.com/cognition/Terence%20McKenna%20-%20Lectures%20on%20Alchemy.pdf.
2015-10-01 15:01:25 +02:00
Jonas Jenwald
1b8cb52555 Prevent PartialEvaluator_buildFormXObject from failing if the Matrix or BBox contains indirect objects
This patch fixes yet another instance of bad PDF data, specifically a case where the `BBox` array contains indirect objects (i.e. `Ref`s).

Fixes the missing image in http://www.int.washington.edu/talks/WorkShops/int_08_37W/People/Franz_M/Franz.pdf#page=24. *Note:* There are missing images on a number of the pages in that file.
2015-09-29 10:11:49 +02:00
Tim van der Meij
973b15c5de Merge pull request #6482 from Snuffleupagus/TilingPattern-baseTransform
Ensure that the `baseTransform` is always defined for TilingPatterns
2015-09-29 00:27:39 +02:00
Tim van der Meij
a6270bb449 Merge pull request #6452 from Snuffleupagus/pr-2875-reduced-test
Replace the unavailable linked test-case for PR 2875 with a reduced test-case
2015-09-29 00:04:16 +02:00
Tim van der Meij
67ed161a6a Merge pull request #6450 from Snuffleupagus/issue-3115-test-new-link
Update the link location for the `issue3115` test file
2015-09-28 23:35:29 +02:00
Jonas Jenwald
9eab463b6d Ensure that the baseTransform is always defined for TilingPatterns
Fixes http://www2.emersonprocess.com/siteadmincenter/PM%20Micro%20Motion%20Documents/High-Pressure-Measurement-WP-001287.pdf#page=3.
2015-09-27 22:49:34 +02:00
Jonas Jenwald
427d0f982d Add a (linked) test-case for issue 4914 2015-09-26 16:09:10 +02:00
Jonas Jenwald
8d831449ab Right-size the map array in PartialEvaluator_readToUnicode
We can avoid a lot of intermediate resizings, by directly allocating the required number of elements for the `map` array.
2015-09-24 13:08:53 +02:00
Jonas Jenwald
b218b222b5 Replace the unavailable linked test-case for PR 2875 with a reduced test-case
This reduced PDF file only contains the relevant text/font; for reference please see PR 2875.
2015-09-16 13:59:58 +02:00
Jonas Jenwald
958fb71ef4 Update the link location for the issue3115 test file
The file (`lshort.pdf`) has changed a couple of times since the test was added, hence there's no guarantee that the current version accurately reflects the issues the test was added to check.
In this patch, I'm updating the link location to point to the *intended* file version (hosted on the "Internet Archive").
2015-09-15 15:17:07 +02:00
Fabian Lange
2564827503 Fix text spacing with vertical fonts (#6387)
According to the PDF spec 5.3.2, a positive value means in horizontal,
that the next glyph is further to the left (so narrower), and in
vertical that it is further down (so wider).
This change fixes the way PDF.js has interpreted the value.
2015-09-15 09:28:45 +02:00
Tim van der Meij
e68a5c0222 Merge pull request #6435 from Snuffleupagus/issue-3205-reduced-test
Replace the unavailable linked test-case for issue 3205 with a reduced test-case
2015-09-14 23:59:14 +02:00
Jonas Jenwald
297984e2e9 Add unit-tests for removeNullCharacters (PR 6431 follow-up)
I overlooked that we already had existing unit-tests for `web/ui_utils.js`, so this PR adds a few tests for `removeNullCharacters` (see PR 6431).
2015-09-14 12:19:29 +02:00
Tim van der Meij
b360fd104b Merge pull request #6420 from Snuffleupagus/pr-4922-test
Add a reduced test-case for PR 4922
2015-09-10 21:54:45 +02:00
Jonas Jenwald
c043a6e3a3 Replace the unavailable linked test-case for issue 3205 with a reduced test-case 2015-09-10 16:59:30 +02:00
Jonas Jenwald
7f7025247a Replace the unavailable linked test-case for issue 4436 with a reduced test-case
Issue 4436 actually contains enough information to create a reduced test-case, which this patch uses to replace a currently unavailable linked test.
2015-09-10 13:01:20 +02:00
Jonas Jenwald
c5c8b239e9 Add unit-tests for stringToPDFString
The other day I was looking as the utilily function `stringToPDFString`, and I noticed that it didn't have any unit-tests. This patch fixes that.
2015-09-10 12:25:40 +02:00
Jonas Jenwald
29a1cdb6a6 Only choose a (3, 1) cmap table for TrueType fonts that have an encoding specified (issue 6410)
For (1, 0) cmaps, we have two different codepaths depending on whether the font has/hasn't got an encoding. But with (3, 1) cmaps we don't have a good fallback when the encoding is missing, hence this patch changes `readCmapTable` to only choose a (3, 1) cmap table if the font is non-symbolic *and* an encoding exists. Without this, we'll not be able to successfully create a working glyph map for some TrueType fonts with (3, 1) cmap tables.

Fixes 6410.
2015-09-07 16:56:05 +02:00
Jonas Jenwald
de6a74f58d Add a reduced test-case for PR 4922 2015-09-05 12:51:05 +02:00
Brendan Dahl
238e16feeb Merge pull request #6407 from Snuffleupagus/bug-1200096
Fallback in `readCmapTable`, instead of using `error`, for TrueType fonts with unsupported cmap formats (bug 1200096)
2015-09-04 18:10:34 -07:00
Tim van der Meij
2a0e0787c3 Merge pull request #6414 from Snuffleupagus/issue-6413
Ensure that the clipping path is reset when the state is restored (issue 6413)
2015-09-04 17:53:16 +02:00
Jonas Jenwald
e16fc486a4 Add (linked) ´load` tests for PR 1976 and 4606
Adds a couple of `load` tests for the `XRef` parsing part of the code-base, see PR 1976 and 4606.
2015-09-04 13:19:32 +02:00
Jonas Jenwald
b4ade44ab9 Add a reduced test-case for issue 6413 2015-09-03 22:29:12 +02:00
Jonas Jenwald
0fb31a4a9e Fallback in readCmapTable, instead of using error, for TrueType fonts with unsupported cmap formats (bug 1200096)
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1200096.

The problematic font has a `format 2` cmap, which we've never supported properly. Prior to PR 2606, we were able to fallback to a working state, despite not having proper support for that cmap format.

Obviously the best/correct solution would be to implement actual support for more cmap formats[1]. However, I'm hoping that a simple patch will be OK for now, given that:
 - `format 2` cmaps seem to be quite rare in practice, since this has been broken for 2.5 years before anyone noticed.
 - Having a simple patch will make potential uplifts a lot easier.

[1] See the specification at https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html
2015-09-01 14:01:19 +02:00
Jonas Jenwald
09b825d1be Add a (linked) load test for PR 4731
Re: PR 4731.
Since the URL points to the Internet Archive, I think that adding a linked test-case should be OK. (Also, it's difficult to create reduced, or even `unit`, tests that accurately captures the brokenness of real-world PDF files.)

*Please note:* Since this is a `load` test, `makeref`ing won't be needed.
2015-08-31 17:15:41 +02:00
Tim van der Meij
678b662720 Merge pull request #6399 from Snuffleupagus/vertical-text-taro
Slightly improved test coverage for vertical text
2015-08-31 16:27:21 +02:00
Tim van der Meij
61459c7e30 Merge pull request #6403 from Snuffleupagus/issue-6113-test
Add a reduced test-case for issue 6113
2015-08-31 15:51:47 +02:00
Yury Delendik
943efea876 Merge pull request #6404 from Snuffleupagus/linearization-unit-tests
Add unit-tests for Linearization dictionary parsing (PR 5023 follow-up)
2015-08-31 07:38:55 -05:00
Tim van der Meij
f518bbcc7c Merge pull request #6401 from Snuffleupagus/paintXObject-subtype-PS-unit-test
Add a unit-test for skipping `paintXObject` if `Subtype === PS` (PR 4861)
2015-08-30 23:03:32 +02:00
Jonas Jenwald
0edb520a10 Add unit-tests for Linearization dictionary parsing (PR 5023 follow-up)
This should *really* have been part of 5023, but better late than never I suppose.
2015-08-30 14:06:11 +02:00
Jonas Jenwald
ba9fcce8eb Add a reduced test-case for issue 6113
As promised in PR 6125, here's a reduced test-case that should (hopefully) avoid the intermittent failure of the previous one.
2015-08-30 01:23:52 +02:00
Jonas Jenwald
0dde08554d Add a unit-test for skipping paintXObject if Subtype === PS (PR 4861) 2015-08-29 20:43:22 +02:00
Jonas Jenwald
3ae49e15b3 Slightly improved test coverage for vertical text
Our current test coverage for vertical text is somewhat lacking, as evident from e.g. issue 6387. That regression could easily have been avoided if the `taro` test-case would have been an `eq` test, as well as an `text` test.
2015-08-29 15:54:32 +02:00
Jonas Jenwald
593ea00ecb Fix typo in test_manifest.json that prevents test-case issue1419.pdf from running
Currently we only attempt to test the *first* page, since `lastPage == 1`, but given that it's subsequently skipped we end up not testing anything.

*Note:* I've verified that the *second* page actually contains the kind of Colour space that the test was intended to check for.
2015-08-28 16:35:10 +02:00
Brendan Dahl
88e0326787 Merge pull request #6337 from Snuffleupagus/issue-6336
Adjust which TrueType (3, 1) glyphs we attempt to skip mapping of (issue 6336)
2015-08-25 09:49:46 -07:00
Jonas Jenwald
56a43a3181 Make XRef_indexObjects more robust against bad PDF files (issue 5752)
This patch improves the detection of `xref` in files where it is followed by an arbitrary whitespace character (not just a line-breaking char).
It also adds a check for missing whitespace, e.g. `1 0 obj<<`, to speed up `readToken` for the PDF file in the referenced issue.
Finally, the patch also replaces a bunch of magic numbers with suitably named constants.

Fixes 5752.

Also improves 6243, but there are still issues.
2015-08-21 20:33:02 +02:00
Jonas Jenwald
5128603f64 Also check maybeLength when deciding if a stream is empty in Parser_makeFilter (issue 6360)
The problem with the PDF files in the issue, besides the obviously broken XRef tables which we're able to recover from, is that many/most of the streams have Dictionaries where the `Length` entry is set to `0`. This causes us to return `NullStream`, instead of the appropriate one in `Parser_makeFilter`.

Fixes 6360.
2015-08-20 23:04:18 +02:00
Jonas Jenwald
2597e3ffca Add a linked test-case for issue 4890 2015-08-18 22:33:09 +02:00
Jonas Jenwald
3fa5f6cc3b Only take the fast-path in PDFImage_createImageData for un-masked JPEG images with "standard" colour spaces (issue 6364)
Fixes 6364.
2015-08-18 22:25:37 +02:00
Jonas Jenwald
99d29487ab Adjust which TrueType (3, 1) glyphs we attempt to skip mapping of (issue 6336)
Fixes 6336.
2015-08-09 12:51:43 +02:00
Tim van der Meij
14f1ea00fe Test case for tensor shading PR 6310 2015-08-04 23:55:55 +02:00
Tilman Hausherr
c85fa00d62 fix handling of flags 1-3 in coons shading
Short story: somebody got lost in two different indices. pi is an index in the stream and is explained on page 198 of the 32000-spec (however 1-based there), and ps is an index to something in PDF.js. I used the code from flag 0 (which works) to understand which is which. It is also important to understand that for flags 1,2 and 3, the stream is always assigned to the same coordinates and colors. What changes is which "old" coordinates and colors are assigned to what is "missing" in the stream. This is why for these flags, the code is identical except for the assignments in the first "row".
2015-08-03 21:15:26 +02:00
Brendan Dahl
a32d521555 Merge pull request #6222 from Rob--W/botio-robustness
Improve robustness of builder (esp. on Windows)
2015-08-03 10:10:35 -07:00
Brendan Dahl
977397ebfd Merge pull request #6270 from Snuffleupagus/opentype-cff-2
Adjust the heuristics used to detect OpenType font file with CFF data (bug 1186827, bug 1182130, issue 6264)
2015-08-03 09:43:33 -07:00
Jonas Jenwald
1d65daf5e5 Correctly access colorSpace.numComps in MeshStreamReader (issue 6287)
This regressed in f750e35224.
2015-07-31 18:00:58 +02:00
Jonas Jenwald
7fe2442a18 Ensure that we don't use the same typed array for both coords and colors in Mesh figures (issue 6287)
This regressed in 1e8d70af98.
2015-07-31 18:00:23 +02:00
Tim van der Meij
d08895d659 Merge pull request #6236 from Rob--W/print-javascript-action
Detect scripted auto-print requests
2015-07-25 19:42:31 +02:00
Jonas Jenwald
0a024b5051 Adjust the heuristics used to detect OpenType font file with CFF data (bug 1186827, bug 1182130, issue 6264)
*This is a tentative patch.*

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1186827.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1182130.
Fixes 6264.
2015-07-25 12:26:36 +02:00
Jonas Jenwald
385e2e5aaf Check if the Decode entry is non-default when deciding if JPEG images are natively supported/decodable (issue 6238)
Tentatively fixes 6238.
2015-07-21 12:23:07 +02:00
Tim van der Meij
980aa10e04 Refactor annotation rectangle code and add unit tests
This patch refactors the code responsible for setting the annotation's rectangle. Its goal is to:

- Actually check that the input array is actually an array, and if so, that it contains exactly four elements.
- Only call `normalizeRect` if the input array is valid, i.e., we do not call it for the default rectangle anymore.

Unit tests are provided just like with the other patches in this series.
2015-07-20 22:01:47 +02:00
Rob Wu
c676ecb5a0 Detect scripted auto-print requests
Fixes #6106

To avoid future regressions, two new unit tests were added:
1. A new PDF based on the report from #6106, which contains an
   OpenAction of type JavaScript and a string "this.print({...}".
2. An existing PDF from https://bugzil.la/1001080 (from #4698).

Although it does not matter, since we don't execute the JavaScript code,
I have also changed "print(true)" to "print({})" since the print method
takes an object (not a boolean). See "Printing PDF documents", page 62:
http://adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_developer_guide.pdf
2015-07-20 18:25:02 +02:00
Tim van der Meij
dbd2ef034f Merge pull request #6196 from Rob--W/run-specific-test
Add --testfilter and -t flags
2015-07-19 13:55:07 +02:00
Rob Wu
b627a1a0d9 Add --testfilter (-t) flag to run a specific test 2015-07-18 17:31:56 +02:00
Rob Wu
cc0805a996 Reduce verbosity of output in test/webbrowser.js 2015-07-17 23:21:35 +02:00
Tim van der Meij
465611a2ff More cleanup regarding annotation border styles 2015-07-17 21:51:24 +02:00
Tim van der Meij
4b6e2724ae Merge pull request #6220 from Snuffleupagus/issue-6218
Ignore double negative in `Lexer_getNumber` (issue 6218)
2015-07-17 21:29:40 +02:00
Jonas Jenwald
d68eb153d3 Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
Rob Wu
c3c6d503ee Improve robustness of builder (esp. on Windows)
- Use rimraf instead of a custom removeDirSync implementation - rimraf
  deals with edge cases like EPERM on Windows.

- Detect when the process exits before it was requested via stop(),
  instead of running the cleanup handler.

- Add fallback for process detection when the process exits before it
  was requested. On *nix systems, this is done via pkill and pgrep, on
  Windows this is done via wmic.

- Add some asserts to check the preconditions of the methods, and output
  some status information to aid debugging in case of failure.

I have verified that these changes work on ArchLinux and Windows XP,
using Chrome and Firefox, as follows:

1. node make unittest

2. node make unittest
3. Restart the Firefox process via the task manager as soon as possible.

4. node make unittest
5. Temporary lock a file/directory within the temporary profile
   directory until the tests have finished, and then unlock the file
   within 10 seconds.

In all cases, the auxilary browser processes are killed, and the
temporary profile directory is wiped.
2015-07-16 21:40:57 +02:00
Jonas Jenwald
c718d1ab10 Ignore double negative in Lexer_getNumber (issue 6218)
Basic mathematics would suggest that a double negative should always become positive, but it appears that Adobe Reader simply ignores that case. Hence I think that it makes sense for us to do the same.

Fixes 6218.
2015-07-16 12:11:49 +02:00
Tim van der Meij
a2e9845093 Refactor annotation color handling and add unit tests 2015-07-15 18:49:19 +02:00
Rob Wu
62cf6536a2 Tests: Resolve -b to full path in webbrowser.js
This allows us to simply use "node test.js -b=firefox" instead of having
to type out the full path.
2015-07-14 00:20:07 +02:00
Tim van der Meij
1416a1b521 Merge pull request #6187 from Snuffleupagus/more-efficient-getDestination
A couple of improvements of `getDestination` (unit-test included)
2015-07-13 23:03:13 +02:00
Brendan Dahl
e498bbce90 Merge pull request #6198 from Rob--W/windows-taskkill
Use taskkill to stop the browser on Windows in tests
2015-07-13 13:30:03 -07:00
Rob Wu
5cce7377af Use taskkill to stop the browser on Windows 2015-07-11 20:22:53 +02:00
Rob Wu
e211c25f06 Improve robustness of stream parser (invalid length)
When the parser finds a stream, it retrieves the Length from the stream
dictionary and advances the lexer to the offset as specified in Length.
If this Length is incorrect, the lexer could end up anywhere.

When the lexer gets in an invalid state, it could throw errors. For
example, in issue 6108, the lexer ends up inside the stream data. This
stream has the ASCIIHexDecode filter, so all characters are made up from
ASCII characters, and the lexer interprets it as a command token. Tokens
cannot be longer than 127 bytes, so eventually 128 bytes are consumed
and the lexer throws "Command token too long" error.

Another possible error is "Illegal character: 41" when the lexer happens
to end up at a ')' due to the length mismatch.

These problems are solved by catching lexer errors and recovering the
parser via the existing stream length detection branch.
2015-07-11 20:12:49 +02:00
Rob Wu
fd29bb0c57 Subtract start offset for xrefs in recovery mode
Xref offsets are relative to the start of the PDF data, not to the start
of the PDF file. This is clear if you look at the other code:

- In the XRef's readXRefTable and processXRefTable methods of XRef, the
  offset of a xref entry is set to the bytes as given by a PDF file.
  These values are always relative to the start of the PDF file (%PDF-).

- The XRef's readXRef method adds the start offset of the stream to
  Xref entry's offset: "stream.pos = startXRef + stream.start".
  Clearly, this line assumes that the entry offset excludes the start
  offset.

However, when the PDF is parsed in recovery mode, the xref table is
filled with entries whose offset is relative to the start of the stream
rather than the PDF file. This is incorrect, and the fix is to subtract
the start offset of the stream from the entry's byte offset.

The manually created PDF file serves as a regression test. It is a valid
PDF, except:
- The integer to point to the start of the xref table and the %%EOF
  trailer are missing. This will activate recovery mode in PDF.js
- Some junk was added before the start of the PDF file. This exposes the
  bad offset bug.
2015-07-10 23:33:10 +02:00
Jonas Jenwald
940bedf75f Add a unit-test that attempts to fetch a non-existent named destination
Doing this helped uncover an issue with the `getDestination` implementation.
Currently if a named destination doesn't exist, the method (in `obj.js`) may return `undefined` which leads to the promise being stuck in a pending state.
*Note:* returning `null` for this case is consistent with other methods, e.g. `getOutline` and `getAttachments`.
2015-07-07 22:05:08 +02:00
Tim van der Meij
31976b9b44 Merge pull request #6181 from Rob--W/test-downloadOnly
Add --downloadOnly flag to test.js
2015-07-06 23:30:01 +02:00
Rob Wu
c7a5da332c Add --downloadOnly flag to test.js 2015-07-06 17:17:11 +02:00
Jonas Jenwald
60fc462bd6 Add more reduced test-cases for PR 6171 2015-07-03 13:14:41 +02:00
Yury Delendik
0787182e6f Adds more characters to the PUA range 2015-07-02 16:47:47 -05:00
Brendan Dahl
d8e201446d Merge pull request #6135 from Snuffleupagus/issue-5677-v2
Skip mapping of CIDFontType2 glyphs when the font either has a |IdentityToUnicodeMap| or a |toUnicodeMap| with 65536 elements (issue 5677)
2015-07-01 11:15:55 -07:00
Brendan Dahl
98339f63a8 Merge pull request #5585 from timvandermeij/annotation-layer-borderstyle
Annotation border styles
2015-07-01 10:48:12 -07:00
Tim van der Meij
e9a6d4451d Merge pull request #6146 from Snuffleupagus/issue-4909-test
Add a reduced test-case for issue 4909
2015-06-29 17:11:10 +02:00
Jonas Jenwald
38955d491f Further improvements of the getStats and getDownloadInfo unit tests
The patch adds a test to ensure that `getStats` returns the expected result after the page has been parsed, and cleans up the existing test a bit.
Also, since I'm touching the file anyway, I'm making a small adjustment of the `getDownloadInfo` test. (I have no idea why I didn't just write it like this initially.)
2015-06-25 23:00:26 +02:00
Jonas Jenwald
7b77408dc1 Add a reduced test-case for issue 4909
I *should* have included this is PR 4910, but for some reason I didn't so better late than never.
2015-06-25 22:34:44 +02:00
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).
2015-06-22 22:10:26 +02:00
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.
2015-06-18 21:53:15 +02:00
Tim van der Meij
6007a57291 Add tests and documentation for the annotation border style class
This patch adds:
- Unit tests for the annotation border style class
- Regression test (self-made) for the annotation border style class
- Documentation generation using JSDoc
2015-06-17 22:28:08 +02:00
Jonas Jenwald
75624c8d82 Clear the |getSinglePixelWidth| cache when rendering Type3 fonts (issue 6117)
Fixes 6117.
2015-06-17 14:30:32 +02:00
Jonas Jenwald
65fee79c5d Remove issue6113.pdf from the test-suite for failing intermittently in Firefox on the Linux bot 2015-06-16 19:40:24 +02:00
Jonas Jenwald
60fbb5ef69 Ensure that the result of |constructStichedFromIRResult| is a number (issue 6113)
Fixes 6113.
2015-06-14 23:29:38 +02:00
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.
2015-06-14 12:10:22 +02:00
Jonas Jenwald
bf20334bea Merge pull request #6090 from Snuffleupagus/issue-6068
Map missing glyphs to the notdef glyph for TrueType (3, 1) fonts (issue 6068)
2015-06-13 00:29:08 +02:00
Tim van der Meij
fda6c18644 Merge pull request #6093 from Snuffleupagus/slightly-improved-crypto-unittests
Slightly improved Crypto unit tests
2015-06-10 00:32:35 +02:00
Jonas Jenwald
f59e20226c Slightly improved Crypto unit tests
Currently in the tests which check that incorrect passwords are rejected, we don't ensure that the exceptions thrown are the ones we expect. This patch improves the current situation, so that we actually can be sure that the code "fails" in the correct way.

*Note:* This patch also fixes some cases of weird indentation in the file.
2015-06-10 00:21:40 +02:00
Tim van der Meij
cbc7a0b178 Merge pull request #6101 from Snuffleupagus/issue-6099-test
Add a test-case for issue 6099 - CalRGB color space where the parameters are a |Ref|
2015-06-10 00:14:00 +02:00
Jonas Jenwald
97385587a8 Add a test-case for issue 6099 - CalRGB color space where the parameters are a |Ref|
The issue is already fixed by PR 5748, but we didn't have access to a suitable test-case. Thanks to issue 6099, we are now able to add one!
2015-06-09 17:52:36 +02:00
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).
2015-06-06 18:28:16 +02:00
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.
2015-06-05 23:53:22 +02:00
Brendan Dahl
749a60a0b7 Merge pull request #5990 from Snuffleupagus/missing-glyphs-identityUnicode
Skip mapping of CIDFontType2 glyphs in fonts with a |IdentityToUnicodeMap|, unless |properties.widths| is defined for the glyph
2015-06-05 14:50:02 -07:00
Jonas Jenwald
64e1fb99fe Fetch parameters if they are |Ref|s in Pattern color spaces (issue 6081)
Fixes 6081.
2015-06-04 22:01:01 +02:00
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.
2015-05-30 12:21:05 +02:00
Yury Delendik
d105734686 Merge pull request #6046 from AppShuttle/pdf-version-fix
Extract correct PDF format version from the catalog
2015-05-27 08:50:20 -05:00
Jonas Jenwald
39d2103063 Merge pull request #6021 from timvandermeij/test-driver
Refactor the test driver
2015-05-26 21:01:13 +02:00
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.
2015-05-26 01:56:09 +01:00
Tim van der Meij
e02ab9fb79 Implement an option to disable automatic scrolling
This adds a checkbox with which one can disable scrolling, for example to look back at output during testing. Note that the styles are inline because the test runner removes all <style> elements for each test.
2015-05-21 20:19:36 +02:00
Tim van der Meij
07ec736eb9 Improve driver code structure
- Improve variable names and move variables to the top of the method
- Use constants where possible
- Only print the delay text if there is an atual delay set
- Simplify continuation logic in _nextTask
- Do not pass anything to clearCanvas: we can get the context from this.canvas there.
- Remove innerHTML and replace it with textContent. Add a comment why insertAdjancentHTML is so important for performance and runtime.
- Merge _quit and _sendQuitRequest.
2015-05-21 20:19:32 +02:00
Tim van der Meij
ae8748edfb Refactor test driver to be more class-like
- Extract NullTextLayerBuilder and SimpleTextLayerBuilder from the driver code and create classes for them.
- Move options to the constructor and pass in HTML elements instead of getting them in the driver.
- Remove unused masterMode variable.
- Minor method name updates.

The rest is only moving/indenting existing code and adding 'this'.
2015-05-21 20:19:02 +02:00
Yury Delendik
07af86cf70 Merge pull request #6016 from Snuffleupagus/issue-6010
Convert UTF8 encoded passwords to ISO-8859-1 for |R = 6| encryption (issue 6010)
2015-05-18 08:22:47 -05:00
Tim van der Meij
d59660cfa6 Clean up the test driver
- Remove a hack for Chrome on Windows because we do not run Chrome on the Windows bot anymore, so it added unneeded complexity.
- Merge nextTask and continueNextTask functions. nextTask did nothing more than calling cleanup. This change also allows us to remove the callback for that function.
- Remove unnecessary one-line functions.
2015-05-15 23:21:20 +02:00
Tim van der Meij
58769fd3b9 Refactor test slave
- Improved names of elements
- Easier scrolling code
2015-05-15 23:20:14 +02:00
Tim van der Meij
7da9626d16 Merge pull request #5901 from Snuffleupagus/bug-1050040
Fall back to the |defaultEncoding| when no valid "post" table is found in TrueType fonts (bug 1050040)
2015-05-15 12:54:04 +02:00
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.
2015-05-14 22:38:04 +02:00
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.
2015-05-14 21:46:31 +02:00
Tim van der Meij
90982332bf Merge pull request #5995 from CodingFabian/tweak-char-spacing-text-selection
Apply char spacing only when there are chars.
2015-05-14 20:06:22 +02:00
Jonas Jenwald
9788ba0270 Add a reduced test-case for issue 5896
This should have been part of PR 5898.
2015-05-14 14:08:43 +02:00
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.
2015-05-14 13:16:14 +02:00
Fabian Lange
c2013094e7 Apply char spacing only when there are chars. 2015-05-13 23:45:20 +02:00
Tim van der Meij
d484ebd492 Merge pull request #5910 from jordan-thoms/fix-concatenated-files
Fix error reading concatenated pdfs
2015-05-13 22:40:55 +02:00
Jonas Jenwald
6d2d854f65 Merge pull request #5815 from Snuffleupagus/type1-diff-refs
Ensure that entries in the Differences array of Type1 fonts are either numbers or names
2015-05-07 22:33:23 +02:00
Brendan Dahl
cd53cbe7d4 Merge pull request #5964 from Snuffleupagus/bug-1157493
Handle the Encoding being a dictionary in PartialEvaluator_preEvaluateFont (bug 1157493)
2015-05-05 14:41:32 -07:00
Brendan Dahl
4824baf31c Merge pull request #5905 from timvandermeij/specialpowers
Remove SpecialPowers addon
2015-04-27 10:36:54 -07:00
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.
2015-04-25 16:48:14 +02:00
Jonas Jenwald
4a022bc40a Add a reduced test-case for issue 5801 2015-04-25 11:28:33 +02:00
Jonas Jenwald
7c7d05e7a3 Attempt to infer if a CMap file actually contains just a standard Identity-H/Identity-V map 2015-04-25 11:28:33 +02:00
Tim van der Meij
48b2f6d023 Merge pull request #5756 from Snuffleupagus/issue-5751
Guess CIDFontType0 subtype based on font file contents (issue 5751)
2015-04-24 23:50:07 +02:00
Brendan Dahl
846eb967cc Merge pull request #5655 from Snuffleupagus/issue-5644
Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644)
2015-04-20 11:46:27 -07:00
Jordan Thoms
d0ea772fc6 Fix error reading concatenated pdfs 2015-04-18 20:56:07 +12:00
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.
2015-04-17 20:32:27 +02:00
Marco Castelluccio
fbae39983c Fail with a more informative error message if the browser executable path doesn't exist 2015-04-17 16:12:13 +02:00
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).
2015-04-09 17:27:03 +02:00
Tim van der Meij
ba8a4f2b3e Merge pull request #5911 from Snuffleupagus/test-worker-comments
Remove commented out code about |disableWorker| in the test suite
2015-04-04 14:46:13 +02:00
Jonas Jenwald
36ac67583f Remove commented out code about |disableWorker| in the test suite
Since the tests have run with workers enabled for a long time, these comments are no longer relevant.
2015-04-04 13:32:44 +02:00
Tim van der Meij
50573b82a3 Provide only one browser manifest example 2015-04-03 21:21:54 +02:00
Tim van der Meij
27170ff858 Remove prefs.js file
The first preference is also in user.js and the second one was only needed for SpecialPowers.
2015-04-03 20:18:42 +02:00
Tim van der Meij
75d8f70d06 Remove SpecialPowers addon 2015-04-03 20:17:20 +02:00
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.
2015-03-26 13:22:45 +01:00
Brendan Dahl
519b6669f0 Merge pull request #5705 from Snuffleupagus/bug-1108301
Don't map glyphs to Unicode "Dotted circle" combining mark (bug 1108301)
2015-03-24 16:33:04 -07:00
Jonas Jenwald
e894a0a4c6 Guess CIDFontType0 subtype based on font file contents (issue 5751) 2015-03-15 13:35:48 +01:00
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.
2015-03-10 13:07:09 +01:00
Yury Delendik
f4dbd69e06 Merge pull request #5595 from fkaelberer/useBinarySearchToFindVisibleElements
Use binary search in getVisibleElements()
2015-03-09 23:11:50 -05:00
Tim van der Meij
c69ad5885c Merge pull request #5770 from Snuffleupagus/opentype-cff
Correctly detect OpenType font files with CFF data
2015-03-06 22:58:43 +01:00
Jonas Jenwald
97eb215b5f Add a reduced test-case for issue 5734 2015-03-05 16:20:03 +01:00
Jonas Jenwald
82f73bc9f4 Add a |text| test-case for issue 5421
Prior to PR 4259, we *incorrectly* ignored `toUnicode` for Type3 fonts. Since we now handle that correctly, this patch adds a `text` test-case to prevent regressions.
2015-03-03 13:13:34 +01:00
fkaelberer
a78bb6b946 Use binary search in getVisibleElements() 2015-03-01 17:41:20 +01:00
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.
2015-02-28 13:43:53 +01:00
Jonas Jenwald
00ee6bd6b6 Merge pull request #5693 from collinanderson/whitespace
cleaned whitespace
2015-02-28 10:09:21 +01:00
Yury Delendik
23916b2b14 Merge pull request #5748 from Snuffleupagus/issue-5747
Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747)
2015-02-26 17:44:46 -06:00
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.
2015-02-27 00:20:38 +01:00
Jonas Jenwald
888cbe0bde Avoid getting stuck in empty nodes in the Pages tree when calling |Catalog_getPageDict| (issue 5644) 2015-02-22 17:42:15 +01:00
Jonas Jenwald
7c8996558a Fetch parameters if they are a |Ref| in CalGray/CalRGB color spaces (issue 5747) 2015-02-20 12:53:02 +01:00
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.
2015-02-19 13:58:03 +01:00
Brendan Dahl
6bb0a483b1 Merge pull request #5703 from Snuffleupagus/issue-5701
Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
2015-02-18 14:50:19 -08:00
Collin Anderson
54e984c763 cleaned whitespace 2015-02-17 11:07:37 -05:00
Tim van der Meij
27e3558a41 Fix CCITTStream regression by byte-aligning rows before checking EOL marker 2015-02-13 21:29:00 +01:00
Jonas Jenwald
592890a758 Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701) 2015-02-13 01:03:10 +01:00
Jonas Jenwald
8614c17c1d Merge pull request #5717 from timvandermeij/testcase-5567
Test case for issue 5567
2015-02-13 00:39:52 +01:00
Brendan Dahl
394b38b22f Merge pull request #5651 from Snuffleupagus/missing-glyphs
Try to skip mapping of missing TrueType and CIDFontType2 glyphs
2015-02-11 19:31:22 -08:00
Tim van der Meij
d124fc5e08 Test case for issue 5567 2015-02-10 00:16:54 +01:00
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.
2015-02-07 12:19:38 +01:00
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.
2015-02-07 12:19:37 +01:00
Jonas Jenwald
ad41a2d574 Add support for TrueType (0, 0) cmap tables (issue 5501 and 5574) 2015-01-11 14:54:12 +01:00
Jonas Jenwald
5332c02a02 Fix lint error: "test/webserver.js: line 177, col 106, Line is too long." 2015-01-08 12:22:34 +01:00
Yury Delendik
4ec132a2ba Adds encoding for test server index page. 2015-01-07 21:35:48 -06:00