Fixing advance after disabled symbols
This commit is contained in:
parent
72355121a0
commit
bcdf7b46c5
@ -751,31 +751,31 @@ 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;
|
||||||
|
|
||||||
var scaledX = x / fontSizeScale;
|
if (!glyph.disabled) {
|
||||||
switch (textRenderingMode) {
|
var scaledX = x / fontSizeScale;
|
||||||
default: // other unsupported rendering modes
|
switch (textRenderingMode) {
|
||||||
case TextRenderingMode.FILL:
|
default: // other unsupported rendering modes
|
||||||
case TextRenderingMode.FILL_ADD_TO_PATH:
|
case TextRenderingMode.FILL:
|
||||||
ctx.fillText(char, scaledX, 0);
|
case TextRenderingMode.FILL_ADD_TO_PATH:
|
||||||
break;
|
ctx.fillText(char, scaledX, 0);
|
||||||
case TextRenderingMode.STROKE:
|
break;
|
||||||
case TextRenderingMode.STROKE_ADD_TO_PATH:
|
case TextRenderingMode.STROKE:
|
||||||
ctx.strokeText(char, scaledX, 0);
|
case TextRenderingMode.STROKE_ADD_TO_PATH:
|
||||||
break;
|
ctx.strokeText(char, scaledX, 0);
|
||||||
case TextRenderingMode.FILL_STROKE:
|
break;
|
||||||
case TextRenderingMode.FILL_STROKE_ADD_TO_PATH:
|
case TextRenderingMode.FILL_STROKE:
|
||||||
ctx.fillText(char, scaledX, 0);
|
case TextRenderingMode.FILL_STROKE_ADD_TO_PATH:
|
||||||
ctx.strokeText(char, scaledX, 0);
|
ctx.fillText(char, scaledX, 0);
|
||||||
break;
|
ctx.strokeText(char, scaledX, 0);
|
||||||
case TextRenderingMode.INVISIBLE:
|
break;
|
||||||
break;
|
case TextRenderingMode.INVISIBLE:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
x += charWidth;
|
x += charWidth;
|
||||||
|
Loading…
Reference in New Issue
Block a user