Merge pull request #8340 from ydfzgyj/fix-svg-spacing

Fix char spacing bug in SVG mode
This commit is contained in:
Yury Delendik 2017-05-05 07:41:25 -05:00 committed by GitHub
commit c3cfcbe72f

View File

@ -692,7 +692,8 @@ SVGGraphics = (function SVGGraphicsClosure() {
var width = glyph.width;
var character = glyph.fontChar;
var charWidth = width * widthAdvanceScale + charSpacing * fontDirection;
var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;
var charWidth = width * widthAdvanceScale + spacing * fontDirection;
x += charWidth;
current.tspan.textContent += character;