Commit Graph

12 Commits

Author SHA1 Message Date
Jonas Jenwald
273d8cb746 Add non-PRODUCTION/TESTING overflow asserts to various string helper-functions (issue 6759) 2021-06-27 16:06:30 +02:00
Jonas Jenwald
6912bb5e0a Move the IdentityToUnicodeMap/ToUnicodeMap from src/core/fonts.js and into its own file 2021-05-02 21:00:29 +02:00
Jonas Jenwald
3d55b2b10e Replace done callbacks in the font-tests with async/await instead 2021-04-19 13:26:39 +02:00
Jonas Jenwald
15a5f66973 Enable the ESLint no-var rule in the test/font/ folder
This was done automatically, using the `gulp lint --fix` command.
2020-10-26 23:42:44 +01:00
Jonas Jenwald
6967b9dd96 Modernize the font-tests
This patch first of all enables linting of the files in the `test/font/` folder, and secondly it also re-factors all test files to use native `import`/`export` statements. Finally, all tests are now loaded correctly, rather than being included as scripts through the `font_test.html` file.
2020-10-26 23:42:44 +01:00
Jonas Jenwald
769c1450b7 [api-minor] Refactor fetching of built-in CMaps to utilize a factory on the display side instead, to allow users of the API to provide a custom CMap loading factory (e.g. for use with Node.js)
Currently the built-in CMap files are loaded in `src/core/cmap.js` using `XMLHttpRequest` directly. For some environments that might be a problem, hence this patch refactors that to instead use a factory to load built-in CMaps on the main thread and message the data to the worker thread.

This is inspired by other recent work, e.g. the addition of the `CanvasFactory`, and to a large extent on the IRC discussion starting at http://logs.glob.uno/?c=mozilla%23pdfjs&s=12+Oct+2016&e=12+Oct+2016#c53010.
2017-02-16 10:55:35 +01:00
Yury Delendik
0a700fa29d Updates Jasmine version. 2016-03-29 09:34:13 -05:00
Manas
f6d28ca323 Refactors CMapFactory.create to make it async 2016-03-21 23:08:19 +05:30
Brendan Dahl
b5b94a4af3 Use built in CMaps and unify the glyph mapping. 2014-02-11 10:27:09 -08:00
mduan
5bffd2e7d8 Implement 9.6.6.4 of pdf spec for truetype fonts 2013-01-30 13:01:32 -05:00
Yury Delendik
0646d397eb Rejects post table if maxp numGlyph does not match 2012-11-14 16:17:06 -06:00
Yury Delendik
fbe3d71663 Re-creates invalid post table 2012-11-07 11:03:08 -06:00