fix(svg) char spacing bug

This commit is contained in:
巴里切罗 2017-04-27 18:31:06 +08:00
parent 366277d180
commit d58040aa29

View File

@ -693,7 +693,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;