1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

used width info in fontDict

This commit is contained in:
sbarman 2011-07-20 12:57:47 -07:00
parent 8763002c44
commit c7aec8ac8a
2 changed files with 25 additions and 0 deletions

13
pdf.js
View file

@ -3820,9 +3820,22 @@ var PartialEvaluator = (function() {
fileType = fileType.name;
}
var widths = fontDict.get('Widths');
var firstChar = fontDict.get('FirstChar');
var lastChar = fontDict.get('LastChar');
if (widths) {
var glyphWidths = [];
for (var i = 0; i < firstChar; ++i)
glyphWidths.push(0);
for (var i = 0, ii = widths.length; i < ii; ++i)
glyphWidths.push(widths[i]);
}
var properties = {
type: subType.name,
subtype: fileType,
glyphWidths: glyphWidths,
encoding: encodingMap,
charset: charset,
firstChar: fontDict.get('FirstChar'),