Browse Source

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

Fix char spacing bug in SVG mode
Yury Delendik 8 years ago committed by GitHub
parent
commit
c3cfcbe72f
  1. 3
      src/display/svg.js

3
src/display/svg.js

@ -692,7 +692,8 @@ SVGGraphics = (function SVGGraphicsClosure() { @@ -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;

Loading…
Cancel
Save