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:
parent
0b1b8da982
commit
391ec1f99a
2 changed files with 9 additions and 4 deletions
10
fonts.js
10
fonts.js
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue