Christian Krebs
79f34b183c
Treat fonts with the same font descriptor, encoding and unicode map as aliases
...
Different fonts can point to the same font descriptor
(see https://github.com/mozilla/pdf.js/issues/4339 for details). With this
commit such fonts are treated as aliases if they have also the same encoding
and the same toUnicode map. The according info is stored on the font descriptor.
This change must also ensure that aliases use always the same font name
because translated fonts can get cleared depending on the CLEANUP_TIMEOUT setting.
11 years ago
fkaelberer
c978c026fa
clean up string conversion functions
11 years ago
Jonas Jenwald
66e243f506
Fix coding style in src/core/fonts.js
11 years ago
Jonas Jenwald
5f021b067c
Prevent infinite loop in CFFParser_parseHeader
11 years ago
Yury Delendik
69efd9cb96
CMaps binary packing
11 years ago
Juraj Sukop
4c2a462a76
Fix copy-paste typo
...
The Compact Font Format Specification defines the Standard String of SID 237 as "twodotenleader", and not "266 ff".
11 years ago
Nicholas Nethercote
6c698519cd
Avoid allocations in executeCommand().
11 years ago
Nicholas Nethercote
6a75e45309
Allocate fewer objects when parsing 2 and 4 byte chunks.
...
This is achieved by adding getBytes2() and getBytes4() to streams, and by
changing int16() and int32() to take multiple scalar args instead of an array
arg.
11 years ago
Nicholas Nethercote
0866ad5bff
Add a cache for glyphs.
...
This reduces memory consumption for text heavy documents. I tested five
documents and saw hit rates ranging from 97.4% to 99.8% (most of the misses are
due to |width| varying even when |fontChar| matches). On two of those documents
I saw improvements of 40 and 50 MiB.
The patch also introduces the Glyph constructor, and renames the |unicodeChars|
local variable as |unicode| for consistency with the corresponding Glyph
property.
11 years ago
Ben Browitt
8b6aeee35c
Follow JMPR op only if outside of FDEF and IF
11 years ago
Yury Delendik
7dbd088728
Fixes corrupted by Aspose fonts.
11 years ago
Nicholas Nethercote
ab7568c0ff
Use Array.join() to build up strings in more places.
11 years ago
Yury Delendik
adca8d4291
Rejects invalid fpgm table when too many functions
11 years ago
Jonas Jenwald
08687ee9f1
Add 'registered' and 'trademark' to mapPrivateUseChars (bug 925985)
11 years ago
Brendan Dahl
b187326022
Use default encoding for standard fonts without a file.
11 years ago
Brendan Dahl
f7fea015a9
Remove isFixedPitch check for now.
11 years ago
Brendan Dahl
f1c73edac4
Fix symbol fonts with no file.
11 years ago
Brendan Dahl
b5b94a4af3
Use built in CMaps and unify the glyph mapping.
11 years ago
Yury Delendik
0131101275
Takes ascent/descent in account in the text layer
11 years ago
Yury Delendik
51b958dc2b
Adds glyph mapping for standard fonts
11 years ago
Brendan Dahl
2228343f77
Only trigger warning bar on certain unsupported features.
11 years ago
Yury Delendik
9a633f26a0
Fixes gidStart for CID fonts
12 years ago
Yury Delendik
82a9a13e5f
Fixes glyphs with invalid flags
12 years ago
Yury Delendik
57e2a667ee
Fixes cvt table length; removes cvt when hints invalid
12 years ago
Sriram
8dad6d6e8a
Fix word spacing in Type 0 fonts
...
Fix word spacing in Type 0 font
correct word spacing
correct word spacing in type 0 font
fix word spacing
12 years ago
Yury Delendik
175341cb0d
Resizes loca table when needed
12 years ago
Yury Delendik
cf55d69c38
Fixes invalid maxZones value
12 years ago
Yury Delendik
93076ced03
Ignoring glyphs without points
12 years ago
Yury Delendik
bbda42110b
Skipping empty font tables
12 years ago
Yury Delendik
bb2570c9c1
Removes duplicate entries after reading cmap table
12 years ago
Yury Delendik
cd44093891
Workaround for some bad Type1 data
12 years ago
Yury Delendik
95d9107d8b
Fixes reading Type1 FontBBox data for usWin values
12 years ago
Yury Delendik
104d89856d
Renames Symbol encoding name.
12 years ago
Yury Delendik
83e17c2953
Avoiding 'pc is undefined' failures
12 years ago
Brendan Dahl
f79c182314
Proper glyph selection for CIDFontType0C fonts.
12 years ago
Brendan Dahl
f32e65b19f
Read multi-byte character codes based on codespace ranges.
12 years ago
Brendan Dahl
db591769a4
Fix handling of multiply-encoded glyphs.
12 years ago
Brendan Dahl
bb2529de03
Move the creation of canvas path fonts to the worker.
12 years ago
Brendan Dahl
5ecce4996b
Split files into worker and main thread pieces.
12 years ago
Tim van der Meij
b2b922b866
Support for CMap GBKp-EUC-H
12 years ago
Yury Delendik
41c7c6f351
Fixing CFF checksum for test font
12 years ago
Yury Delendik
34177b01a4
Fixes glyph 0 in CIDTypeFont2
12 years ago
Brendan Dahl
f04dbcaf2e
Use dummy font for testing when pdf fonts are loaded.
12 years ago
Yury Delendik
19e8f2f059
lookChar refactoring
12 years ago
Yury Delendik
3461d02d05
Enforces trailing spaces
12 years ago
Yury Delendik
121c183db1
Fail if other font types are found
12 years ago
Yury Delendik
6dc4b10b40
Implements reparing of CFF table
12 years ago
Brendan Dahl
6d34d422ae
Fix notdef typo.
12 years ago
Yury Delendik
df352b375b
Refactoring TTF repair logic
12 years ago
Yury Delendik
8e298acb67
Fixes reading unordered Subrs in Type1
12 years ago