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

Merge pull request #5379 from brendandahl/nbsp

Don't map glyphs to unicode non breaking space.
This commit is contained in:
Yury Delendik 2014-12-18 13:38:03 -06:00
commit 31ae5f2a3d
3 changed files with 15 additions and 0 deletions

View file

@ -2690,6 +2690,7 @@ var Font = (function FontClosure() {
fontCharCode <= 0x1f || // Control chars
fontCharCode === 0x7F || // Control char
fontCharCode === 0xAD || // Soft hyphen
fontCharCode === 0xA0 || // Non breaking space
(fontCharCode >= 0x80 && fontCharCode <= 0x9F) || // Control chars
// Prevent drawing characters in the specials unicode block.
(fontCharCode >= 0xFFF0 && fontCharCode <= 0xFFFF) ||
@ -4708,6 +4709,8 @@ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
glyphId = glyphNames.indexOf(baseEncoding[charCode]);
if (glyphId >= 0) {
charCodeToGlyphId[charCode] = glyphId;
} else {
charCodeToGlyphId[charCode] = 0; // notdef
}
}
} else if (!!(properties.flags & FontFlags.Symbolic)) {
@ -4724,6 +4727,8 @@ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
glyphId = glyphNames.indexOf(baseEncoding[charCode]);
if (glyphId >= 0) {
charCodeToGlyphId[charCode] = glyphId;
} else {
charCodeToGlyphId[charCode] = 0; // notdef
}
}
}
@ -4736,6 +4741,8 @@ function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) {
glyphId = glyphNames.indexOf(glyphName);
if (glyphId >= 0) {
charCodeToGlyphId[charCode] = glyphId;
} else {
charCodeToGlyphId[charCode] = 0; // notdef
}
}
}