aboutsummaryrefslogtreecommitdiffstats
path: root/dist
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-08 13:53:14 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-08 13:53:14 +0100
commit15fd93ef07c1860fba7d7b285fe94dcb97c6f334 (patch)
treee1c0e3c46425bf22ac8bf49a48ea3cedce0dffe1 /dist
parentae04f7599c822dec52af60c51aeb2ab135818c5d (diff)
downloadsvg.js-15fd93ef07c1860fba7d7b285fe94dcb97c6f334.tar.gz
svg.js-15fd93ef07c1860fba7d7b285fe94dcb97c6f334.zip
`SVG.Text.rebuild()` now takes every font-size into account (#512)
Diffstat (limited to 'dist')
-rw-r--r--dist/svg.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/dist/svg.js b/dist/svg.js
index e80e6bd..ba031c9 100644
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -6,7 +6,7 @@
* @copyright Wout Fierens <wout@mick-wout.com>
* @license MIT
*
-* BUILT: Thu Nov 08 2018 12:57:03 GMT+0100 (GMT+01:00)
+* BUILT: Thu Nov 08 2018 13:49:37 GMT+0100 (GMT+01:00)
*/;
var SVG = (function () {
'use strict';
@@ -6313,8 +6313,11 @@ var SVG = (function () {
if (this._rebuild) {
var self = this;
var blankLineOffset = 0;
- var dy = this.dom.leading * new SVGNumber(this.attr('font-size'));
+ var leading = this.dom.leading;
this.each(function () {
+ var fontSize = window.getComputedStyle(this.node).getPropertyValue('font-size');
+ var dy = leading * new SVGNumber(fontSize);
+
if (this.dom.newLined) {
this.attr('x', self.attr('x'));