From 0fc934fe43b17fd8cb2e7e93ed622c7422daa725 Mon Sep 17 00:00:00 2001 From: dhrname Date: Tue, 21 Feb 2012 23:30:06 +0900 Subject: [PATCH] =?utf8?q?SVGTextPositioningElement=E3=81=AEdeterminant?= =?utf8?q?=E3=82=92=E5=A4=89=E6=95=B0=E3=81=AB=E6=A0=BC=E7=B4=8D=E3=81=97?= =?utf8?q?=E3=81=A6=E8=BB=BD=E9=87=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- org/w3c/dom/svg.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org/w3c/dom/svg.js b/org/w3c/dom/svg.js index c9f3131..0ac4817 100644 --- a/org/w3c/dom/svg.js +++ b/org/w3c/dom/svg.js @@ -4191,7 +4191,8 @@ SVGTextPositioningElement.prototype._texto = function(evt) { ti = tar.firstChild, ttp = tar._tar, style = tar.ownerDocument.defaultView.getComputedStyle(tar, null), - n = parseFloat(style.getPropertyValue("font-size")) * Math.sqrt(Math.abs(tar.getScreenCTM()._determinant())), + deter = Math.sqrt(Math.abs(tar.getScreenCTM()._determinant())), + n = parseFloat(style.getPropertyValue("font-size")) * deter, tod = tar.ownerDocument.documentElement, ttpc = ttp, //ttpcはttpのキャッシュ tlen = tar.getComputedTextLength(), @@ -4205,7 +4206,7 @@ SVGTextPositioningElement.prototype._texto = function(evt) { ttps.fontStyle = style.getPropertyValue("font-style"); ttps.fontWeight = style.getPropertyValue("font-weight"); if (isFinite(parseFloat(lts))) { - ttps.letterSpacing = parseFloat(lts) * Math.sqrt(Math.abs(tar.getScreenCTM()._determinant())) + "px"; + ttps.letterSpacing = parseFloat(lts) * deter + "px"; } /*ここでの変数jは前回ノードまでの総文字数*/ for (var i=0, j=0, tli=tar.getNumberOfChars();i