aboutsummaryrefslogtreecommitdiffstats
path: root/src/text.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/text.js')
-rw-r--r--src/text.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/text.js b/src/text.js
index 7528c27..301373c 100644
--- a/src/text.js
+++ b/src/text.js
@@ -20,7 +20,8 @@ SVG.extend(SVG.Text, {
var i, n,
s = this._style(),
p = this.parentDoc(),
- a = t.split("\n");
+ a = t.split("\n"),
+ f = this.style['font-size'];
while (this.node.hasChildNodes())
this.node.removeChild(this.node.lastChild);
@@ -29,7 +30,7 @@ SVG.extend(SVG.Text, {
n = new TSpan().
text(a[i]).
attr({
- dy: this.style['font-size'] * this.leading,
+ dy: f * this.leading - (i == 0 ? f * 0.3 : 0),
x: (this.attr('x') || 0),
style: s
});