Remove the first empty character of charset

This commit is contained in:
Vivien Nicolas 2011-06-30 02:58:40 +02:00
parent e448dce42b
commit 2e71f79865
2 changed files with 4 additions and 1 deletions

View File

@ -479,7 +479,7 @@ var Font = (function () {
var charset = properties.charset;
if (charset && charset.length) {
// XXX why is the first character equal to ''?
log(charset);
for (var i = 1; i < charset.length; i++) {
var position = getUnicodeRangeFor(GlyphsUnicode[charset[i]]);
if (position < 32) {

3
pdf.js
View File

@ -3440,6 +3440,7 @@ var CanvasGraphics = (function() {
if (charset) {
assertWellFormed(IsString(charset), "invalid charset");
charset = charset.split("/");
charset.shift();
}
} else if (IsName(encoding)) {
var encoding = Encodings[encoding.name];
@ -3534,6 +3535,8 @@ var CanvasGraphics = (function() {
type: subType.name,
encoding: encodingMap,
charset: charset,
firstChar: fontDict.get("FirstChar"),
lastChar: fontDict.get("LastChar"),
bbox: descriptor.get("FontBBox"),
ascent: descriptor.get("Ascent"),
descent: descriptor.get("Descent"),