Undo some changes for now until there is support for font.spacedWidth
This commit is contained in:
parent
d26969a85f
commit
9b9de87ac4
@ -541,12 +541,17 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||||||
if (typeof items[j] === 'string') {
|
if (typeof items[j] === 'string') {
|
||||||
chunk += fontCharsToUnicode(items[j], font);
|
chunk += fontCharsToUnicode(items[j], font);
|
||||||
} else if (items[j] < 0) {
|
} else if (items[j] < 0) {
|
||||||
|
// making all negative offsets a space - better to have
|
||||||
|
// a space in incorrect place than not have them at all
|
||||||
chunk += ' ';
|
chunk += ' ';
|
||||||
} else if (items[j] < 0 && font.spacedWidth > 0) {
|
// This is a better way to detect spacing in the future.
|
||||||
var numFakeSpaces = Math.round(-e / font.spacedWidth);
|
// However, for now let's keep it simple (also, font.spacedWidth)
|
||||||
if (numFakeSpaces > 0) {
|
// is not available.
|
||||||
chunk += ' ';
|
// } else if (items[j] < 0 && font.spacedWidth > 0) {
|
||||||
}
|
// var numFakeSpaces = Math.round(-e / font.spacedWidth);
|
||||||
|
// if (numFakeSpaces > 0) {
|
||||||
|
// chunk += ' ';
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user