1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Merge pull request #3890 from sriram-dev/3205-word-spacing

correct word spacing
This commit is contained in:
Yury Delendik 2013-11-08 09:18:00 -08:00
commit d4167b62c8
3 changed files with 14 additions and 1 deletions

View file

@ -4575,8 +4575,10 @@ var Font = (function FontClosure() {
var glyph = this.charToGlyph(charcode);
glyphs.push(glyph);
// placing null after each word break charcode (ASCII SPACE)
if (charcode == 0x20)
// Ignore occurences of 0x20 in multiple-byte codes.
if (length === 1 && chars.charCodeAt(i - 1) === 0x20) {
glyphs.push(null);
}
}
}
else {