Commit Graph

312 Commits

Author SHA1 Message Date
notmasteryet
37315af515 fix 'private' keyword 2011-07-09 23:24:24 -05:00
notmasteryet
67f133dea7 CFF/OTF font and sanitizer friendly fixes 2011-07-09 23:12:11 -05:00
Chris Jones
fb9b8b6417 Merge pull request #226 from andreasgal/staging
simplify font measurement code, bug is now fixed in nightlies, no need to
2011-07-09 16:51:04 -07:00
Andreas Gal
adb619941c simplify font measurement code, bug is now fixed in nightlies, no need to hack around it 2011-07-08 19:28:24 -07:00
Andreas Gal
f2a4756c77 backout font measurement change, it is breaking tests 2011-07-08 18:51:20 -07:00
Andreas Gal
5bf4fcba9b properly fix font loading, shaon's code didn't work after all 2011-07-08 18:45:38 -07:00
Andreas Gal
3fb2b026bf Merge pull request #224 from sbarman/master
fix to bug with detected font loading
2011-07-08 18:39:32 -07:00
sbarman
c06c14a72a fix to font loading code 2011-07-08 18:24:22 -07:00
Andreas Gal
4a7fe7cb5d move text measurement into Font 2011-07-08 17:57:03 -07:00
Andreas Gal
0b6c0db931 move unicode translation cache into Font 2011-07-08 16:36:50 -07:00
Andreas Gal
f6eb9cecd3 avoid font lookup by id in showText 2011-07-08 14:58:19 -07:00
Andreas Gal
d3979e4ac2 Merge pull request #219 from sbarman/font
Font code cleanup, avoid name collisions
2011-07-08 11:06:54 -07:00
sbarman
7b659fd605 fixed case when font cannot be found 2011-07-08 10:04:52 -07:00
sbarman
4404871212 fixed font loading bug 2011-07-08 08:14:34 -07:00
Andreas Gal
7fb940c4ba revert a couple changes from the last merge 2011-07-08 01:02:14 -07:00
Andreas Gal
df79f10f2f Merge pull request #214 from saebekassebil/master
Dict object improvements. Performance.
2011-07-08 00:59:00 -07:00
sbarman
619a521678 minor fix 2011-07-07 17:37:27 -07:00
sbarman
c39eae3ce9 fixed up minor bugs 2011-07-07 17:15:53 -07:00
sbarman
8ac2367fa0 not refer fonts by name, instead use id 2011-07-07 16:48:04 -07:00
Saebekassebil
dc9316db2d Better debug at glyphs 2011-07-07 17:03:24 +02:00
Andreas Gal
6eaad13132 remove fontCount/fontName/kDisableFonts debug hacks and fix bug in font loading 2011-07-06 22:14:48 -07:00
Andreas Gal
3557bae461 temporary revert a change in the font code to make mac fonts work again 2011-07-06 16:06:00 -07:00
notmasteryet
4169fe151d Merge branch 'master' of https://github.com/andreasgal/pdf.js.git into cff-issues
Conflicts:
	fonts.js
2011-07-06 08:16:07 -05:00
notmasteryet
70164163de fixing CFF things to pass FontValidator 2011-07-06 08:12:41 -05:00
Rob Sayre
f5a3587dde Almost passing gjslint. 2011-07-05 23:06:45 -07:00
Chris Jones
2dc1ff98ac built-in fonts are not cached 2011-07-05 00:02:09 -04:00
Chris Jones
122d168b51 fix some bugs 2011-07-04 23:28:44 -04:00
Chris Jones
fe09c1852c handle font names with comments (fix fix of hack hack) 2011-07-04 18:21:13 -04:00
Vivien Nicolas
ac5db21fb1 Let Chrome (and others?) show TrueType fonts 2011-07-03 22:29:46 +02:00
Vivien Nicolas
cdff127eef Let Chrome (and others?) handle Type1 Fonts (TrueType not working yet) 2011-07-03 14:52:00 +02:00
Vivien Nicolas
f58983f4e5 Clean up Fonts.convert() 2011-07-03 01:17:28 +02:00
Vivien Nicolas
b390a03a1d Merge branch 'master' of https://github.com/andreasgal/pdf.js 2011-07-02 07:54:58 +02:00
Vivien Nicolas
d28c0cb41e Get rid of FontsUtils 2011-07-02 07:54:28 +02:00
Chris Jones
818f79986b work around chrome bug, and work around ff5 bug in the workaround 2011-07-01 22:19:02 -07:00
Vivien Nicolas
a600a3d2ce Fix bustage while merging 2011-07-02 06:01:43 +02:00
Vivien Nicolas
41d4738289 Merge with upstream 2011-07-02 05:50:59 +02:00
Vivien Nicolas
3e78538c1c Remove cmap format 100, fixes some nits to merge with upstream 2011-07-02 05:46:50 +02:00
Vivien Nicolas
3726686d22 Add a format100 table for Mac 2011-07-02 02:44:57 +02:00
Vivien Nicolas
3dcf65d9df Fix a small issue in the waiting for font to load code 2011-07-02 01:01:55 +02:00
Vivien Nicolas
d10cf7c929 Reland commit 442d184 but make it works with uncompressed PDF 2011-07-02 00:19:24 +02:00
Vivien Nicolas
63e4f0293f Add support for stemHW/stemVW/stemSnapH/stemSnapV 2011-07-01 11:28:22 +02:00
Chris Jones
7b883a89db merge 2011-07-01 01:23:20 -07:00
Vivien Nicolas
e13164eca6 Read the text matrix from the Type1 font ascii header 2011-07-01 07:16:56 +02:00
Vivien Nicolas
ae2d130f40 Improve the extractInfo code to be more robust 2011-07-01 05:16:27 +02:00
Vivien Nicolas
697aa0f15e Merge branch 'master' of https://github.com/andreasgal/pdf.js 2011-07-01 03:39:55 +02:00
Vivien Nicolas
dae18a2710 Use strings instead of arrays in CFF.wrap 2011-07-01 03:24:23 +02:00
Vivien Nicolas
db30cc6de1 Start converting CFF class to use strings instead of arrays 2011-07-01 00:57:17 +02:00
Vivien Nicolas
5cbc6875b3 Open the CFF class road for Type1C font 2011-07-01 00:44:11 +02:00
Chris Jones
082edd6460 merge 2011-06-30 14:57:00 -07:00
Julian Viereck
391c26b407 Make worker work again after latest font changes 2011-06-30 14:25:57 +02:00
Vivien Nicolas
2e7df01459 Fix windows mispotionning issue 2011-06-30 12:40:21 +02:00
Chris Jones
6b72f8e98a just create one dummy element too, and centralize hackery 2011-06-30 03:02:50 -07:00
Chris Jones
9bc06a9924 load all newly-created fonts in one document to speed things up 2011-06-30 02:51:42 -07:00
Vivien Nicolas
ce17e9481f Merge branch 'master' of https://github.com/andreasgal/pdf.js 2011-06-30 11:50:53 +02:00
Vivien Nicolas
9b67a1e6b5 Forgot to add pdf.js to the last commit 2011-06-30 11:50:47 +02:00
Vivien Nicolas
1c78d8fdb4 Fix more headers tables 2011-06-30 11:48:43 +02:00
Chris Jones
49058c9174 merge with remote 2011-06-30 02:14:47 -07:00
Chris Jones
a564076b22 add another hackity hack to detect font loaded-ness 2011-06-30 02:08:53 -07:00
Andreas Gal
05381cc531 cache font measurements 2011-06-30 01:00:58 -07:00
Vivien Nicolas
7ff6f5166c Fix languages bustage 2011-06-30 09:25:57 +02:00
Vivien Nicolas
64f8e79bf8 Make windows table header more compatible with windows 2011-06-30 05:38:10 +02:00
Vivien Nicolas
2334399498 Add more information about the italic angle 2011-06-30 03:27:22 +02:00
Vivien Nicolas
9921288f44 Set a default font size identical for .notdef 2011-06-30 03:24:07 +02:00
Vivien Nicolas
a2974b2f58 Map .notdef in order to attach the [missing|break]Char to it 2011-06-30 03:01:46 +02:00
Vivien Nicolas
2e71f79865 Remove the first empty character of charset 2011-06-30 02:58:40 +02:00
Vivien Nicolas
e448dce42b Add better informations for the OS/2 table 2011-06-30 02:52:47 +02:00
Vivien Nicolas
1c611d4e32 Improve a bit the createNameTable code 2011-06-30 01:18:11 +02:00
Vivien Nicolas
4c6c20fc29 Fix a few headers fields 2011-06-29 21:53:22 +02:00
Vivien Nicolas
a7c3ebcac3 Do not include the padding size in the length declared in the table header 2011-06-29 21:30:25 +02:00
Vivien Nicolas
0a7531cb33 Calculate correct checksum for the field header 2011-06-29 21:29:33 +02:00
Vivien Nicolas
91399b50ef Use the shadow method in Fonts.ctx 2011-06-29 03:00:23 +02:00
Vivien Nicolas
dd923d5aea Merge with upstream, reverse changeset 4e24288 since it brokes TTF on linux 2011-06-29 02:58:51 +02:00
Chris Jones
7c9bf1f36f Merge pull request #95 from jviereck/master
Make processing of fonts happen in a worker.
2011-06-28 14:56:10 -07:00
Vivien Nicolas
80f650b6bb Add a fake canvas for scaling fonts to improve perfs 2011-06-28 18:24:16 +02:00
Vivien Nicolas
63e1601464 Small cleanup 2011-06-28 17:35:15 +02:00
Adil Allawi
4e242880b6 Function replaceCMapTable() was not setting the font pos pointer to the correct place to read the cmap. Caused Mac PDFs to fail because the cmap was not correctly rewritten. 2011-06-28 15:14:38 +01:00
Vivien Nicolas
82928b14a1 Handle division in hsbw to provide the correct information to the hmtx table 2011-06-28 13:34:39 +02:00
Vivien Nicolas
fe55204042 Add 1 to the number of metrics in the HHEA table and remove the mapping of .notdef 2011-06-28 13:15:00 +02:00
Vivien Nicolas
bfe0356533 Filled notdef in the cmap table 2011-06-28 13:06:31 +02:00
Julian Viereck
519fb435c3 Fonts.js: Add isLoadedCallback and add hack known from worker/client.js 2011-06-28 09:50:53 +02:00
Julian Viereck
23e9064f17 Make all fonts render. Use encoding from FontWorker. Render canvas if id!=0 although fonts haven't arrived yet.
Conflicts:

	worker/pdf.js
2011-06-28 08:06:40 +02:00
Julian Viereck
b00df76044 First pass on FontWorker 2011-06-28 08:06:40 +02:00
notmasteryet
23af586934 Fix the regression at 6073a03 2011-06-27 21:48:16 -05:00
Andreas Gal
cc9c7baefb Merge pull request #100 from notmasteryet/openweb-cover
CMYK colors; font fixes r=gal
2011-06-27 18:15:22 -07:00
notmasteryet
d934f81895 Rollback defaults for font's Length1 and Length2 2011-06-27 19:56:19 -05:00
notmasteryet
6073a030ab CMYK colors; font fixes 2011-06-27 19:34:41 -05:00
Vivien Nicolas
a56e5ade22 Next try for windows (2) 2011-06-28 01:39:09 +02:00
Vivien Nicolas
0783f3a896 Next try for windows 2011-06-28 01:17:36 +02:00
Vivien Nicolas
61da963dae Give a shot at passing better information to hmtx (hinting is slightly broken) 2011-06-28 00:11:53 +02:00
Vivien Nicolas
798d7a10ca Use the right width field in hmtx 2011-06-27 21:17:25 +02:00
Andreas Gal
659286c000 Merge pull request #96 from vingtetun/master
Fix windows/mac font loading detection. r=gal
2011-06-26 20:46:10 -07:00
Vivien Nicolas
bcf5ade41c Kill Flatten - part 1 2011-06-26 10:04:56 +02:00
Vivien Nicolas
8241d5fe02 Fix windows/mac font loading detection 2011-06-25 11:52:42 +02:00
Vivien Nicolas
9d04548db3 Type1 fonts pass the sanitizer (again) 2011-06-25 11:22:28 +02:00
Vivien Nicolas
29eae2c468 Do less manual conversion 2011-06-25 05:45:15 +02:00
Vivien Nicolas
7bc26ba127 Add the Type1 subrs into the CFF local subrs index 2011-06-25 05:12:35 +02:00
Andreas Gal
cdb8788865 nits 2011-06-24 17:12:06 -04:00
Vivien Nicolas
c1c8ca4ef3 Do not add the font-loader canvas to the page dom to save some load time 2011-06-24 21:25:08 +02:00
Vivien Nicolas
26389c083a Fix a bunch of warnings from Firebug strict mode 2011-06-24 11:58:05 +02:00
Vivien Nicolas
07ca9bfec5 Start adding a FontLoader class to isolate the font-loaded hack 2011-06-24 11:47:22 +02:00
Vivien Nicolas
bc7e2b0110 Don't read the lsb instead of the width 2011-06-24 03:01:41 +02:00
Vivien Nicolas
5443714d34 Fix Windows 'hmtx' bust table 2011-06-24 02:58:17 +02:00
Vivien Nicolas
69449f7346 Merge branch 'master' of https://github.com/vingtetun/pdf.js 2011-06-24 01:39:55 +02:00
Vivien Nicolas
df406d43a1 Remove some useless var 2011-06-24 01:37:54 +02:00
Vivien Nicolas
a4bb3cba5b Merge remote branch 'upstream/master' 2011-06-24 00:29:32 +02:00
Julian Viereck
3bef1534b4 Reverts parts of 60f4d16360: Use old font-is-loaded mechanism + some code refactoring to add bindDOM and bindWorker. 2011-06-23 23:33:25 +02:00
Julian Viereck
4b27045d2e Ensure divs used to make fonts load are not visible 2011-06-23 23:33:25 +02:00
Julian Viereck
da7f555fd7 Change postMessage to send only one object that holds the action and data. 2011-06-23 23:33:24 +02:00
Julian Viereck
a3d815074d First pass on review: worker.js -> pdf_worker.js, Font.bind cleanup + other stuff 2011-06-23 23:33:24 +02:00
Julian Viereck
fc007b99d0 Introduce ImageCanvas to handle canvas rendering in WebWorker 2011-06-23 23:33:22 +02:00
Julian Viereck
61b76c7e87 Make fonts getting loaded by a very nasty hack 2011-06-23 23:33:22 +02:00
Julian Viereck
e15328800a Most working, but once you add the font-css file to the web page, there is no font drawn at all 2011-06-23 23:32:24 +02:00
Vivien Nicolas
4d155983c5 Remove some hardcoded glue 2011-06-23 23:15:22 +02:00
Vivien Nicolas
ef418de40b Fix bustage of the previous commit 2011-06-23 22:20:55 +02:00
Vivien Nicolas
fc35a70acb Add a createPostTable function and remove the useless join('') calls 2011-06-23 22:11:16 +02:00
Chris Jones
57e7e798a6 fix strict-mode violations in chrome 2011-06-22 18:50:38 -07:00
Vivien Nicolas
a772c9a2e2 Fill more gaps for Format 6 dense array 2011-06-22 11:25:00 +02:00
Vivien Nicolas
e0c98ba3c6 Enhance the converter code by filling Format 6 dense array gaps 2011-06-22 10:56:31 +02:00
Vivien Nicolas
00df9b82ee Start of a TTF Format6 to Format4 converter (sigh) 2011-06-22 07:46:41 +02:00
Vivien Nicolas
fdfd03b671 Support Format 6 cmap table, but does not pass the sanitizer yet 2011-06-22 04:41:31 +02:00
Vivien Nicolas
11a1ebaada Start displaying TrueType fonts 2011-06-21 21:11:59 +02:00
Vivien Nicolas
ff6aaa02ee Get rid of the TrueType class, adapt the code to conventions and new code 2011-06-21 06:49:59 +02:00
Vivien Nicolas
083256634c Add a name to some anonyous functions 2011-06-21 04:35:28 +02:00
Vivien Nicolas
81532e9c03 Rename s2a, s16, s32 and do some dance inside the bind() code 2011-06-21 04:30:28 +02:00
Vivien Nicolas
d923953ee3 Merge with master 2011-06-21 02:35:14 +02:00
Vivien Nicolas
d7edbe28e9 Add a way to disable fonts that won't load 2011-06-20 21:14:33 +02:00
Andreas Gal
be6347c28d remove remaining uses of integerToBytes in type1 font code 2011-06-20 14:42:39 -04:00
Andreas Gal
70887f617f assemble cmap table from strings instead of arrays 2011-06-20 04:27:21 -04:00
Andreas Gal
f63af3e614 write font cmap using a string 2011-06-20 04:20:51 -04:00
Andreas Gal
83c1599cf7 simplify glyph segment writing code 2011-06-20 04:16:41 -04:00
Andreas Gal
fa56770562 store ranges as [start, end], instead of storing all codes 2011-06-20 03:49:40 -04:00
Andreas Gal
2d2aee3c2e use Array.sort to calculate glyph ranges instead of large typed arrays 2011-06-20 03:33:52 -04:00
Vivien Nicolas
75f0930465 Add more TrueType rewriting magic ('post' table) 2011-06-20 08:20:31 +02:00
Vivien Nicolas
ad7a06b1d5 Check for more missing tables in TrueType (sigh) 2011-06-20 03:01:09 +02:00
Andreas Gal
b827da304f make createCMAPTable a nested function function 2011-06-19 16:35:32 -07:00
Andreas Gal
631b5df2c3 in preparation for using strings to write out font data, store constant blobs as strings 2011-06-19 16:32:26 -07:00
Andreas Gal
f337d6105c write OTF header using a string, not an array 2011-06-19 16:13:59 -07:00
Andreas Gal
e46a88b1dc rename conver to convert 2011-06-19 15:58:30 -07:00
Andreas Gal
d3923569de make createOpenTypeHeader and createTableEntry inner functions of co(n)ver(t) so we can use an upvar to collect the output 2011-06-19 15:58:02 -07:00
Andreas Gal
458625d656 make createOpenTypeHeader and createTableEntry inner functions 2011-06-19 15:54:27 -07:00
Andreas Gal
75ad5aa016 add a closure around Font so we can hide helper functions in it 2011-06-19 15:46:58 -07:00
Andreas Gal
5001ee7120 don't use an array to translate from a typed array to a string, and always store font data as typed array, never as a stream 2011-06-19 15:30:55 -07:00
Andreas Gal
d515d5ab7c handle surrogate pairs in glyph to unicode translation 2011-06-19 15:14:07 -07:00
Vivien Nicolas
bf835f7aa5 Really pass the sanitizer (encoding is broken) 2011-06-19 11:07:03 +02:00
Vivien Nicolas
8a24a967c3 Make Helvetica and Helvetica bold from page 2 to pass the sanitizer 2011-06-19 09:29:28 +02:00
Chris Jones
92fa629d10 use strict mode and fix violators 2011-06-18 23:18:46 -07:00
Chris Jones
d4a42a4e79 mozMeasureText() is non-standard and deprecated 2011-06-18 22:04:36 -07:00
Vivien Nicolas
7e3c1340ff Re-enable TrueType and add a TODO about translating the ToUnicode entry (note TrueType still fails on cmap) 2011-06-19 04:35:25 +02:00
Vivien Nicolas
a46ebe73ff Ask chromium to shut up on font/otf mimetype by using another wrong mimetype and fix a few more 'strict mode' errrors 2011-06-19 03:04:15 +02:00
Vivien Nicolas
e62bd48a9e Use strict mode for js files 2011-06-19 02:35:28 +02:00
Vivien Nicolas
59bd7620de Fill informations for the 'name' table in order to pass the sanitizer (Mozilla bug 660088) 2011-06-19 02:25:21 +02:00
Vivien Nicolas
8d9ffb1872 Use measureText instead of mozMeasureText (deprecated) 2011-06-18 21:54:53 +02:00
Vivien Nicolas
a53736b732 Merge remote branch 'upstream/master' 2011-06-18 21:53:52 +02:00
Andreas Gal
6dc697071e avoid toString conversion in lookup 2011-06-17 21:34:06 -07:00
Andreas Gal
5517602df0 speedup unicode/glyph conversion and cache translated strings in the font 2011-06-17 21:22:37 -07:00
Andreas Gal
735bfa5972 move cffStandardStrings into utils/ along with font_utils.js 2011-06-17 16:07:09 -07:00
Vivien Nicolas
21ee01eb7c Fix wrong order of the 'div' command 2011-06-17 23:38:01 +02:00
Vivien Nicolas
172dadb008 Clean up some debug leftovers 2011-06-17 13:55:42 +02:00
Andreas Gal
fd269facbc 2nd attempt to make glyph list integers 2011-06-17 01:03:21 -07:00
Andreas Gal
4184414501 revert commit 2311c954f8 2011-06-17 00:46:27 -07:00
Andreas Gal
2311c954f8 store unicode value as integer instead of hex string in glyphlist 2011-06-17 00:34:03 -07:00
Vivien Nicolas
6f91d109c6 Rename PDFFonts.js to fonts.js 2011-06-17 09:11:03 +02:00