[Sie-announce] SIEコード [1390] 文字の位置あわせをより正確に行った(さらなる調整が必要)

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2009年 11月 2日 (月) 23:35:10 JST


Revision: 1390
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1390
Author:   dhrname
Date:     2009-11-02 23:35:10 +0900 (Mon, 02 Nov 2009)

Log Message:
-----------
文字の位置あわせをより正確に行った(さらなる調整が必要)

Modified Paths:
--------------
    branches/05x/053/sie.js

Modified: branches/05x/053/sie.js
===================================================================
--- branches/05x/053/sie.js	2009-11-02 13:43:16 UTC (rev 1389)
+++ branches/05x/053/sie.js	2009-11-02 14:35:10 UTC (rev 1390)
@@ -1882,7 +1882,7 @@
         var index = data.indexOf(glyphs[i].getAttribute("unicode")), path = document.createElement("v:shape");
         if (index > -1) {
           //fontSizeと文字数をかけた長さ分、ずらしていく
-          var x = dx + fontSize * index, y = dy + fontSize * index;
+          var x = dx + fontSize * index, y = dy;
           ti.parentNode.insertBefore(path, ti);
           NAIBU.pathData(glyphs[i].getAttribute("d"), path, true, x, y, ti.w, ti.h, fontSize, parseFloat(em || 1000));
         }
@@ -1942,7 +1942,7 @@
       for (var i=0,gli=glyphs.length;i<gli;++i) {
         var index = data.indexOf(glyphs[i].getAttributeNS(null, "unicode")), path = document.createElementNS(NAIBU.svgNameSpace, "path");
         //fontSizeと文字数をかけた長さ分、ずらしていく
-        var x = dx + fontSize * index, y = dy + fontSize * index;
+        var x = dx + fontSize * index, y = dy;
         ti.insertBefore(path);
         NAIBU.pathData(glyphs[i].getAttributeNS(null, "d"), path, false, x, y);
       }
@@ -1954,7 +1954,7 @@
 };
 NAIBU.pathData = function(/*string*/ data, /*Element*/ p, /*boolean*/ t, /*float*/x, y, w, h, fontSize, em) {
   //CTMでフォントを移動させておく
-  var fe = fontSize / em, matrix = new Matrix(fe, 0, 0, -fe, x*fe, -y*fe - em*fontSize);
+  var fe = fontSize / em, matrix = new Matrix(fe, 0, 0, -fe, x, y+fontSize);
   if (t) { //IEならば
     var s = new STPath(p, matrix);
     s.d = data;




Sie-announce メーリングリストの案内
Back to archive index