Jonas Jenwald
c5f4051a75
A few small optimizations of adjustMapping
...
Replace a couple of |in| checks with comparisons against undefined.
11 years ago
Jonas Jenwald
c121def806
A few small optimizations for CIDFontType2 fonts
...
Cache a constant length and replace one usage of |in| with a comparison against undefined.
11 years ago
Jonas Jenwald
b19bb74813
Additional heuristics to recognize unknown glyphs for toUnicode (bug 1027533)
11 years ago
Yury Delendik
0cd28ebfa3
Telemetry for used stream and font types
11 years ago
Jonas Jenwald
158790981c
Don't blindly trust toUnicode when building toFontChar for non-standard fonts without a font file (issue 4934)
11 years ago
Jonas Jenwald
3c5dedf60d
Prevent font error when no preferred cmap table is found (workaround for issue 4800)
11 years ago
Yury Delendik
e5a0d89da9
Refactors loadFont for translateFont be async; fixes type3 dup data
11 years ago
Jonas Jenwald
3e1db41ddd
Fix loading of fonts with empty font files (bug 866395 and issue 3522)
11 years ago
Jonas Jenwald
0fa154be4e
Amend GlyphMapForStandardFonts to fix issue 4276
11 years ago
Jonas Jenwald
747dec16b2
Prevent trying to map characters to the specials unicode block in adjustMapping (issue 4650)
11 years ago
Yury Delendik
98e023e464
Guesses Type1C font type based on file content
11 years ago
Yury Delendik
9a5c121e4d
Fixes invalid CFF name for Mac OSX
11 years ago
Yury Delendik
bf3a2488df
Recognizes ascii type1 encoding
11 years ago
fkaelberer
b06c10cbbd
rename getUint32 to getInt32 and collect readInt*() in util.js
11 years ago
Rob Wu
2e97c0d085
Remove some unused variables from src/
...
Only obviously useless, local variables have been removed.
11 years ago
Yury Delendik
65fa25ca36
Fixes number of glyphs in the generated font
11 years ago
Brendan Dahl
b242826d29
Fix seac regression.
11 years ago
Yury Delendik
88c1747cc3
Heuristics to recognize the unknown glyphs for toUnicode
11 years ago
Tim van der Meij
df91acf239
Fixes lint warning W004 in src/core
11 years ago
Brendan Dahl
5bd8a83c9b
Build the text layer geometry on the worker.
11 years ago
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
Jonas Jenwald
9e6c66be12
Handle 'space' character correctly in WinAnsiEncoding (bug 850854)
11 years ago
Jonas Jenwald
8fc4ebd5cb
Handle 'space' character correctly in MacRomanEncoding (bug 878026)
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