mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Unicode normalization; lint warnings
This commit is contained in:
parent
04551dbf57
commit
c85ec052b1
3 changed files with 707 additions and 11 deletions
|
@ -494,12 +494,18 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
case 'TJ':
|
||||
var items = args[0];
|
||||
for (var j = 0, jj = items.length; j < jj; j++) {
|
||||
if (typeof items[j] === 'string')
|
||||
text += fontCharsToUnicode(items[j], font.translated.properties);
|
||||
if (typeof items[j] === 'string') {
|
||||
text += fontCharsToUnicode(items[j],
|
||||
font.translated.properties);
|
||||
} else if (items[j] < 0) {
|
||||
// making all negative offsets a space - better to have
|
||||
// a space in incorrect place than not have them at all
|
||||
text += ' ';
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'Tj':
|
||||
text += fontCharsToUnicode(args[0], font.translated.properties);;
|
||||
text += fontCharsToUnicode(args[0], font.translated.properties);
|
||||
break;
|
||||
} // switch
|
||||
|
||||
|
@ -889,7 +895,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||
// read char procs only if dependency is specified
|
||||
if (dependency) {
|
||||
var charProcs = xref.fetchIfRef(dict.get('CharProcs'));
|
||||
var fontResources = xref.fetchIfRef(dict.get('Resources')) || resources;
|
||||
var fontResources = xref.fetchIfRef(dict.get('Resources')) ||
|
||||
resources;
|
||||
properties.resources = fontResources;
|
||||
properties.charProcIRQueues = {};
|
||||
for (var key in charProcs.map) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue