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

Moving defaultWidth into the charsToGlyphs function

This commit is contained in:
notmasteryet 2011-09-18 09:11:31 -05:00
parent 0b1b8da982
commit 391ec1f99a
2 changed files with 9 additions and 4 deletions

View file

@ -1373,7 +1373,10 @@ var Font = (function Font() {
var glyph = encoding[charcode];
if ('undefined' == typeof(glyph)) {
warn('Unencoded charcode ' + charcode);
glyph = { unicode: charcode };
glyph = {
unicode: charcode,
width: this.defaultWidth
};
}
glyphs.push(glyph);
// placing null after each word break charcode (ASCII SPACE)
@ -1387,7 +1390,10 @@ var Font = (function Font() {
var glyph = encoding[charcode];
if ('undefined' == typeof(glyph)) {
warn('Unencoded charcode ' + charcode);
glyph = { unicode: charcode };
glyph = {
unicode: charcode,
width: this.defaultWidth
};
}
glyphs.push(glyph);
if (charcode == 0x20)