mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Ensure lastChar is correct if it's not specified
This commit is contained in:
parent
8145c00215
commit
cd7cf3536d
1 changed files with 4 additions and 1 deletions
5
pdf.js
5
pdf.js
|
@ -4284,9 +4284,12 @@ var PartialEvaluator = (function() {
|
|||
// firstChar and width are required
|
||||
// (except for 14 standard fonts)
|
||||
var firstChar = xref.fetchIfRef(fontDict.get('FirstChar')) || 0;
|
||||
var lastChar = xref.fetchIfRef(fontDict.get('LastChar')) || 0;
|
||||
var widths = xref.fetchIfRef(fontDict.get('Widths')) || [];
|
||||
|
||||
var lastChar = xref.fetchIfRef(fontDict.get('LastChar'));
|
||||
if (!lastChar)
|
||||
lastChar = diffEncoding.length || baseEncoding.length;
|
||||
|
||||
// merge in the differences
|
||||
var glyphsMap = {};
|
||||
for (var i = firstChar; i <= lastChar; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue