OSDN Git Service

more use of \luadef
[luatex-ja/luatexja.git] / src / jfm-ujis.lua
index 61e4802..10b44d8 100644 (file)
@@ -8,6 +8,7 @@
 
 
 local t = {
+   version = 3,
    dir = 'yoko',
    zw = 1.0, zh = 1.0,
    kanjiskip =  { 0.0, 0.25, 0 },
@@ -25,7 +26,8 @@ local t = {
         [107] = { 0, 0, 0, kanjiskip_shrink=1 },
         [207] = { 0, 0, 0, kanjiskip_shrink=1 },
         [8] = { 0, 0, 0, kanjiskip_shrink=1 },
-      }
+      },
+      kern = { [307] = 0 },     
    },
 
    [1] = { -- 開き括弧類
@@ -77,7 +79,7 @@ local t = {
    },
 
    [3] = { -- 中点類
-      chars = {'・', ':', ';'},
+      chars = {'・', ':', ';', '·'},
       align = 'middle', left = 0.0, down = 0.0,
       width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
       --end_stretch = 0.25,
@@ -192,7 +194,8 @@ local t = {
         [4] = { 0, 0, 0, kanjiskip_shrink=1 },
         [6] = { 0, 0, 0, kanjiskip_shrink=1 },
          [8] = { 0, 0, 0, kanjiskip_shrink=1 },
-      }
+      },
+      kern = { [307] = 0 },     
    },
 
    [107] = { -- 1/3 角
@@ -225,6 +228,21 @@ local t = {
       }
    },
 
+   [307] = { -- 1/4 角
+      chars = { 0x3099, 0x309A },
+      align = 'right', left = 0.0, down = 0.0,
+      width = 0, height = 0.88, depth = 0.12, italic=0.0,
+      glue = {
+        [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 },
+        [2] = { 0, 0, 0, kanjiskip_shrink=1 },
+        [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 },
+        [4] = { 0, 0, 0, kanjiskip_shrink=1 },
+        [6] = { 0, 0, 0, kanjiskip_shrink=1 },
+        [207] = { 0, 0, 0, kanjiskip_shrink=1 },
+         [8] = { 0, 0, 0, kanjiskip_shrink=1 },
+      }
+   },
+
    [8] = { -- 罫線類.
       chars = {
         '─', '━', '│', '┃', '┄', '┅', '┆', '┇',
@@ -260,10 +278,7 @@ local t = {
 
 
    [99] = { -- box末尾
-      chars = {'boxbdd', 'parbdd'},
-      glue = {
-        [3] = { 0.25, 0.0, 0.25, priority=1 },
-      }
+      chars = {'boxbdd', 'parbdd', 'glue'},
    },
 
 }
@@ -277,4 +292,13 @@ for i=9758,9778 do ht[#ht+1] = 'AJ1-' .. tostring(i) end
 local ht = t[207].chars
 for i=9738,9757 do ht[#ht+1] = 'AJ1-' .. tostring(i) end
 
+t[100]=table.fastcopy(t[0])
+t[100].chars={'nox_alchar'}
+for i,v in pairs(t) do
+  if i~=6 and type(i)=='number' and type(v)=='table' then -- 感嘆符以外
+    if v.glue and v.glue[0] then v.glue[100] = v.glue[0] end
+    if v.kern and v.kern[0] then v.kern[100] = v.kern[0] end
+  end
+end
+
 luatexja.jfont.define_jfm(t)