Commit Graph

8892 Commits

Author SHA1 Message Date
Brendan Dahl
df7afcf004 Merge pull request #7053 from yurydelendik/rm-pdfjs-core
Removes global PDFJS usage from the src/core/.
2016-03-25 13:19:43 -07:00
Yury Delendik
c22c85f8ee Merge pull request #7113 from yurydelendik/disable-issue6961
Disables issue6961 test.
2016-03-25 13:12:36 -05:00
Yury Delendik
a505aa8e90 Disables issue6961 test. 2016-03-25 12:48:11 -05:00
Jonas Jenwald
b589add2b5 Update l10n files 2016-03-25 14:10:56 +01:00
Brendan Dahl
7aa864db3e Merge pull request #7108 from yurydelendik/frontWindow-null
Removes frontWindow usage from the stream converter.
2016-03-24 10:24:13 -07:00
Yury Delendik
2b246192e1 Removes frontWindow usage from the stream converter. 2016-03-24 11:47:34 -05:00
Tim van der Meij
da8e345d14 Merge pull request #7005 from tobytailor/master
Fixes insertion of blank pages during print if page sizes differ
2016-03-24 14:38:27 +01:00
Yury Delendik
2fa4dd6f40 Proxy global PDFJS.verbosity to properly configure shared/util. 2016-03-23 19:24:37 -05:00
Yury Delendik
a8e5912cb1 Moves shared/global to display/global 2016-03-23 19:24:37 -05:00
Yury Delendik
e372f3608b Makes WorkerMessageHandler non-global. 2016-03-23 19:24:37 -05:00
Yury Delendik
bda5e6235e Removes global PDFJS usage from the src/core/. 2016-03-23 19:24:37 -05:00
Tim van der Meij
e1ac5744d0 Merge pull request #7105 from fkaelberer/fkaelberer-issue-template
Add an ISSUE_TEMPLATE
2016-03-23 22:59:45 +01:00
fkaelberer
4eb9daf34a Add an ISSUE_TEMPLATE 2016-03-23 22:48:14 +01:00
Brendan Dahl
fb47490648 Log uncaught global errors. 2016-03-22 15:49:32 -07:00
Yury Delendik
54ee15d866 Merge pull request #7100 from yurydelendik/stream-wo-parser
Removes core/stream circular dependency on core/parser.
2016-03-22 15:08:12 -05:00
Yury Delendik
4a44a2c7dc Merge pull request #7098 from Snuffleupagus/uint32-checksums
Ensure that TrueType font tables have `uint32` checksums
2016-03-22 14:11:27 -05:00
Yury Delendik
6038c236b2 Removes core/stream circular dependency on core/parser. 2016-03-22 14:06:01 -05:00
Jonas Jenwald
d78fae0181 Ensure that TrueType font tables have uint32 checksums
According to "The table directory" under https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html#Directory, TrueType font tables should have `uint32` checksums.

This is something that I noticed, and was initially confused about, while debugging a TrueType issue.
As far as I can tell, the current (`int32`) checksums we use doesn't cause any issues in practice. However, I do think that this should be addressed to agree with the specification, and to reduce possible confusion when reading the font code.
2016-03-22 13:40:50 +01:00
Tobias Schneider
708895ffba Let print canvas height scale proportionally 2016-03-21 14:21:07 -07:00
Tobias Schneider
aeabd0db20 Fix insertion of blank pages during printing due to non-matching page sizes 2016-03-21 14:21:07 -07:00
Yury Delendik
21ed8ff71d Merge pull request #7039 from prometheansacrifice/async-cmap-factory
Refactors CMapFactory.create to make it async
2016-03-21 13:57:36 -05:00
Manas
f6d28ca323 Refactors CMapFactory.create to make it async 2016-03-21 23:08:19 +05:30
Tim van der Meij
7ad8f3a6f0 Merge pull request #7093 from Snuffleupagus/gulp-importl10n-dir-fix
Use the correct path when checking if a `/l10n` directory exists, to avoid errors during `gulp importl10n` (PR 7063 followup)
2016-03-20 22:12:30 +01:00
Jonas Jenwald
41e5fa3c7a Use the correct path when checking if a /l10n directory exists, to avoid errors during gulp importl10n (PR 7063 followup)
This is regression from PR 7063, causing `gulp importl10n` to fail:
```
$ gulp importl10n
[19:45:02] Using gulpfile c:\Users\Jonas\Git\pdfjs\gulpfile.js
[19:45:02] Starting 'importl10n'...

Downloading ach...
[19:45:02] 'importl10n' errored after 4.42 ms
[19:45:02] Error: EEXIST, file already exists 'c:\Users\Jonas\Git\pdfjs\l10n\ach
'
    at Error (native)
    at Object.fs.mkdirSync (fs.js:747:18)
    at downloadLanguageFiles (c:\Users\Jonas\Git\pdfjs\external\importL10n\local
es.js:59:8)
    at next (c:\Users\Jonas\Git\pdfjs\external\importL10n\locales.js:90:5)
    at Object.downloadL10n (c:\Users\Jonas\Git\pdfjs\external\importL10n\locales
.js:91:5)
    at Gulp.<anonymous> (c:\Users\Jonas\Git\pdfjs\gulpfile.js:92:11)
    at module.exports (c:\Users\Jonas\Git\pdfjs\node_modules\gulp\node_modules\o
rchestrator\lib\runTask.js:34:7)
    at Gulp.Orchestrator._runTask (c:\Users\Jonas\Git\pdfjs\node_modules\gulp\no
de_modules\orchestrator\index.js:273:3)
    at Gulp.Orchestrator._runStep (c:\Users\Jonas\Git\pdfjs\node_modules\gulp\no
de_modules\orchestrator\index.js:214:10)
    at Gulp.Orchestrator.start (c:\Users\Jonas\Git\pdfjs\node_modules\gulp\node_
modules\orchestrator\index.js:134:8)
```
2016-03-20 20:02:43 +01:00
Brendan Dahl
56f5c3a5ff Merge pull request #7088 from Snuffleupagus/issue-6957
Pass the `PDFJS.postMessageTransfer` parameter to the worker, so that the `MessageHandler` can be setup correctly in `createDocumentHandler` (issue 6957)
2016-03-18 13:08:46 -07:00
Jonas Jenwald
91756f6e86 Pass the PDFJS.postMessageTransfer parameter to the worker, so that the MessageHandler can be setup correctly in createDocumentHandler (issue 6957)
This regressed in commit acdd49f480, i.e. PR 6571.

Fixes 6957.
2016-03-16 18:34:26 +01:00
Jonas Jenwald
122d473239 Merge pull request #7084 from timvandermeij/gulp-fix
Revert renaming `node make` to `gulp` for `mozcentral`
2016-03-14 10:25:11 +01:00
Tim van der Meij
2b6d7ba3ec Gulp: allow passing parameters and revert one node make renaming 2016-03-13 21:53:17 +01:00
Yury Delendik
c6d2b7f9d9 Merge pull request #6906 from KamiHQ/fix-printing
avoid apply transform twice for composite context
2016-03-11 08:26:59 -06:00
Yury Delendik
8ba413e761 Better errors capturing at the core and stop rendering on error. 2016-03-11 07:59:09 -06:00
Jonas Jenwald
cd2bd057ab Refactor the building of toFontChar for non-embedded fonts
Currently there's a lot of duplicate code for non-embedded `toFontChar`, which this patch simplifies by extracting the code into a helper function instead.
2016-03-10 21:25:39 +01:00
Tim van der Meij
4784863ef7 Merge pull request #7069 from Snuffleupagus/TrueType-recover-glyphNames
Convert `uniXXXX` glyph names to proper ones when building the `charCodeToGlyphId` map for TrueType fonts (bug 1132849, issue 6893, issue 6894)
2016-03-10 20:45:59 +01:00
Jonas Jenwald
dfe9015a43 Convert uniXXXX glyph names to proper ones when building the charCodeToGlyphId map for TrueType fonts (bug 1132849, issue 6893, issue 6894)
This patch adds a `getUnicodeForGlyph` helper function, which is used to recover Unicode values for non-standard glyph names.

Some PDF generators, e.g. Scribus PDF, use improper `uniXXXX` glyph names which breaks the glyph mapping. We can avoid this by converting them to "standard" glyph names instead.

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1132849.
Fixes 6893.
Fixes 6894.
2016-03-09 19:37:15 +01:00
Tim van der Meij
147598417c Merge pull request #7046 from a0preetham/zero_descent_fix
fonts.js: bad metric overrides when values are zero
2016-03-09 12:14:03 +01:00
Yury Delendik
4065a21f8c Merge pull request #7029 from Snuffleupagus/PDFThumnailView-refactor-canvas-to-image
[PDFThumbnailView] Re-factor the `canvas` to `image` conversion such that we always render to a `canvas`, and then replace it with an `image` once rendering is done
2016-03-07 14:00:39 -06:00
Yury Delendik
b540d7d6dc Merge pull request #7063 from timvandermeij/gulp
Migrate `clean` and `importl10n` target to gulp
2016-03-07 13:29:29 -06:00
Tim van der Meij
96cca2b37a Migrate clean and importl10n target to gulp 2016-03-04 21:14:56 +01:00
Tim van der Meij
b8aaa24257 Convert all node make instances to gulp 2016-03-04 20:30:36 +01:00
Tim van der Meij
ec1cf28679 Merge pull request #7061 from yurydelendik/gulp
Introducing gulp
2016-03-04 19:25:52 +01:00
Yury Delendik
262d1e0863 Import L10n files. 2016-03-04 09:50:51 -06:00
Yury Delendik
9798e1007e Introducing gulp. 2016-03-04 09:36:46 -06:00
Preetham Mysore
be1e12dbcb Fix for descent calculation while reading font hhea headers 2016-03-03 08:51:41 -05:00
Tim van der Meij
51f6aba0a0 Merge pull request #7054 from timvandermeij/fix-typo
Correct a minor name issue in the outline viewer code
2016-03-02 22:58:05 +01:00
Tim van der Meij
f4bb23a66b Correct a minor name issue in the outline viewer code 2016-03-02 22:51:31 +01:00
Tim van der Meij
d302ac612e Merge pull request #6943 from Snuffleupagus/outline-styles
Add support for bold/italic styled outline items in the viewer
2016-03-02 22:42:03 +01:00
Yury Delendik
e1906035ca Merge pull request #7052 from yurydelendik/issue7048
Reverts back un-need change made at #6879.
2016-03-02 11:22:48 -06:00
Yury Delendik
a022f6f069 Reverts back un-need change made at #6879. 2016-03-02 09:57:33 -06:00
Jonas Jenwald
8402c79171 Merge pull request #7050 from brendandahl/issue4402
For CIDFontType2 use CID as glyph ID when missing CID to GID map.
2016-03-02 10:11:42 +01:00
Jonas Jenwald
9b126711cd Add support for bold/italic styled outline items in the viewer 2016-03-02 09:56:58 +01:00
Brendan Dahl
a6acf74b54 Merge pull request #7023 from brendandahl/issue6721
Only draw glyphs on canvas if they are in the font or the font file is missing.
2016-03-01 18:03:37 -08:00