Only offset glyphs that can fit into the private use area
This commit is contained in:
parent
179533a06c
commit
3645ebe42c
4
fonts.js
4
fonts.js
@ -1225,7 +1225,7 @@ var Font = (function Font() {
|
|||||||
for (i in encoding) {
|
for (i in encoding) {
|
||||||
if (encoding.hasOwnProperty(i)) {
|
if (encoding.hasOwnProperty(i)) {
|
||||||
var unicode = encoding[i].unicode;
|
var unicode = encoding[i].unicode;
|
||||||
if (unicode <= 0x1f || (unicode >= 127 && unicode <= kUnicodeCJKStart))
|
if (unicode <= 0x1f || (unicode >= 127 && unicode <= kSizeOfGlyphArea))
|
||||||
encoding[i].unicode = unicode += cmapGlyphOffset;
|
encoding[i].unicode = unicode += cmapGlyphOffset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1233,7 +1233,7 @@ var Font = (function Font() {
|
|||||||
var glyphs = [];
|
var glyphs = [];
|
||||||
for (i = 1; i < numGlyphs; i++) {
|
for (i = 1; i < numGlyphs; i++) {
|
||||||
glyphs.push({
|
glyphs.push({
|
||||||
unicode: i <= 0x1f || (i >= 127 && i < kUnicodeCJKStart) ?
|
unicode: i <= 0x1f || (i >= 127 && i < kSizeOfGlyphArea) ?
|
||||||
i + cmapGlyphOffset : i
|
i + cmapGlyphOffset : i
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user