Fixing advance after disabled symbols

This commit is contained in:
notmasteryet 2012-03-25 14:31:28 -05:00
parent 72355121a0
commit bcdf7b46c5

View File

@ -751,13 +751,12 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
x += Util.sign(current.fontMatrix[0]) * wordSpacing; x += Util.sign(current.fontMatrix[0]) * wordSpacing;
continue; continue;
} }
if (glyph.disabled)
continue;
var char = glyph.fontChar; var char = glyph.fontChar;
var charWidth = glyph.width * fontSize * 0.001 + var charWidth = glyph.width * fontSize * 0.001 +
Util.sign(current.fontMatrix[0]) * charSpacing; Util.sign(current.fontMatrix[0]) * charSpacing;
if (!glyph.disabled) {
var scaledX = x / fontSizeScale; var scaledX = x / fontSizeScale;
switch (textRenderingMode) { switch (textRenderingMode) {
default: // other unsupported rendering modes default: // other unsupported rendering modes
@ -777,6 +776,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
case TextRenderingMode.INVISIBLE: case TextRenderingMode.INVISIBLE:
break; break;
} }
}
x += charWidth; x += charWidth;