|
|
@ -1360,6 +1360,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
var textHScale = current.textHScale * fontDirection; |
|
|
|
var textHScale = current.textHScale * fontDirection; |
|
|
|
var glyphsLength = glyphs.length; |
|
|
|
var glyphsLength = glyphs.length; |
|
|
|
var vertical = font.vertical; |
|
|
|
var vertical = font.vertical; |
|
|
|
|
|
|
|
var spacingDir = vertical ? 1 : -1; |
|
|
|
var defaultVMetrics = font.defaultVMetrics; |
|
|
|
var defaultVMetrics = font.defaultVMetrics; |
|
|
|
var widthAdvanceScale = fontSize * current.fontMatrix[0]; |
|
|
|
var widthAdvanceScale = fontSize * current.fontMatrix[0]; |
|
|
|
|
|
|
|
|
|
|
@ -1406,7 +1407,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
x += fontDirection * wordSpacing; |
|
|
|
x += fontDirection * wordSpacing; |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} else if (isNum(glyph)) { |
|
|
|
} else if (isNum(glyph)) { |
|
|
|
x += -glyph * fontSize * 0.001; |
|
|
|
x += spacingDir * glyph * fontSize / 1000; |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1476,6 +1477,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
var font = current.font; |
|
|
|
var font = current.font; |
|
|
|
var fontSize = current.fontSize; |
|
|
|
var fontSize = current.fontSize; |
|
|
|
var fontDirection = current.fontDirection; |
|
|
|
var fontDirection = current.fontDirection; |
|
|
|
|
|
|
|
var spacingDir = font.vertical ? 1 : -1; |
|
|
|
var charSpacing = current.charSpacing; |
|
|
|
var charSpacing = current.charSpacing; |
|
|
|
var wordSpacing = current.wordSpacing; |
|
|
|
var wordSpacing = current.wordSpacing; |
|
|
|
var textHScale = current.textHScale * fontDirection; |
|
|
|
var textHScale = current.textHScale * fontDirection; |
|
|
@ -1483,7 +1485,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
var glyphsLength = glyphs.length; |
|
|
|
var glyphsLength = glyphs.length; |
|
|
|
var isTextInvisible = |
|
|
|
var isTextInvisible = |
|
|
|
current.textRenderingMode === TextRenderingMode.INVISIBLE; |
|
|
|
current.textRenderingMode === TextRenderingMode.INVISIBLE; |
|
|
|
var i, glyph, width; |
|
|
|
var i, glyph, width, spacingLength; |
|
|
|
|
|
|
|
|
|
|
|
if (isTextInvisible || fontSize === 0) { |
|
|
|
if (isTextInvisible || fontSize === 0) { |
|
|
|
return; |
|
|
|
return; |
|
|
@ -1504,7 +1506,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { |
|
|
|
current.x += wordSpacing * textHScale; |
|
|
|
current.x += wordSpacing * textHScale; |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} else if (isNum(glyph)) { |
|
|
|
} else if (isNum(glyph)) { |
|
|
|
var spacingLength = -glyph * 0.001 * fontSize; |
|
|
|
spacingLength = spacingDir * glyph * fontSize / 1000; |
|
|
|
this.ctx.translate(spacingLength, 0); |
|
|
|
this.ctx.translate(spacingLength, 0); |
|
|
|
current.x += spacingLength * textHScale; |
|
|
|
current.x += spacingLength * textHScale; |
|
|
|
continue; |
|
|
|
continue; |
|
|
|