OSDN Git Service

Changed the property of box drawing characters (U+2500--U+257F).
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 3 May 2012 00:51:28 +0000 (09:51 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Thu, 3 May 2012 00:51:28 +0000 (09:51 +0900)
src/jfm-ujis.lua
src/ltj-rmlgbm.lua
src/luatexja-kinsoku.tex
test/test01-noembed.pdf
test/test01-noembed.tex

index 87846f9..4b984c5 100644 (file)
@@ -40,7 +40,8 @@ luatexja.jfont.define_jfm {
         [3] = { 0.25, 0.0, 0.25 },
         [5] = { 0.5 , 0.0, 0.5  },
         [6] = { 0.5 , 0.0, 0.5  },
-        [7] = { 0.5 , 0.0, 0.5  }
+        [7] = { 0.5 , 0.0, 0.5  },
+        [8] = { 0.5 , 0.0, 0.5  },
       }
    },
 
@@ -57,6 +58,7 @@ luatexja.jfont.define_jfm {
         [5] = { 0.25, 0.0, 0.25 },
         [6] = { 0.25, 0.0, 0.25 },
         [7] = { 0.25, 0.0, 0.25 },
+        [8] = { 0.25, 0.0, 0.25 },
       }
    },
 
@@ -70,12 +72,13 @@ luatexja.jfont.define_jfm {
         [3] = { 0.75, 0.0, 0.25 },
         [5] = { 0.5 , 0.0, 0.0  },
         [6] = { 0.5 , 0.0, 0.0  },
-        [7] = { 0.5 , 0.0, 0.0  }
+        [7] = { 0.5 , 0.0, 0.0  },
+        [8] = { 0.5 , 0.0, 0.0  },
       }
    },
 
    [5] = { -- ダッシュ
-      chars = { '―', '‥', '…' },
+      chars = { 'â\80\94', 'â\80\95', 'â\80¥', 'â\80¦' },
       align = 'left', left = 0.0, down = 0.0,
       width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
       glue = {
@@ -98,7 +101,8 @@ luatexja.jfont.define_jfm {
         [7] = { 0.5 , 0.0, 0.5  },
       },
       kern = {
-        [5] = 0.0
+        [5] = 0.0,
+        [8] = 0.0
       }
    },
 
@@ -132,6 +136,36 @@ luatexja.jfont.define_jfm {
       }
    },
 
+   [8] = { -- 罫線類.
+      chars = {
+        '─', '━', '│', '┃', '┄', '┅', '┆', '┇',
+        '┈', '┉', '┊', '┋', '┌', '┍', '┎', '┏',
+        '┐', '┑', '┒', '┓', '└', '┕', '┖', '┗',
+        '┘', '┙', '┚', '┛', '├', '┝', '┞', '┟',
+        '┠', '┡', '┢', '┣', '┤', '┥', '┦', '┧',
+        '┨', '┩', '┪', '┫', '┬', '┭', '┮', '┯',
+        '┰', '┱', '┲', '┳', '┴', '┵', '┶', '┷',
+        '┸', '┹', '┺', '┻', '┼', '┽', '┾', '┿',
+        '╀', '╁', '╂', '╃', '╄', '╅', '╆', '╇', 
+        '╈', '╉', '╊', '╋', '╌', '╍', '╎', '╏',
+        '═', '║', '╒', '╓', '╔', '╕', '╖', '╗',
+        '╘', '╙', '╚', '╛', '╜', '╝', '╞', '╟',
+        '╠', '╡', '╢', '╣', '╤', '╥', '╦', '╧',
+        '╨', '╩', '╪', '╫', '╬', '╭', '╮', '╯',
+        '╰', '╱', '╲', '╳', '╴', '╵', '╶', '╷',
+        '╸', '╹', '╺', '╻', '╼', '╽', '╾', '╿',
+      },
+      align = 'left', left = 0.0, down = 0.0,
+      width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+      glue = {
+        [1] = { 0.5 , 0.0, 0.5  },
+        [3] = { 0.25, 0.0, 0.25 }
+      },
+      kern = {
+        [8] = 0.0
+      }
+   },
+
    [99] = { -- box末尾
       chars = {'boxbdd', 'parbdd'},
       glue = {
index c34b4fb..5ee567b 100644 (file)
@@ -14,7 +14,6 @@ luatexja.load_module('base');      local ltjb = luatexja.base
 
 local cidfont_data = {}
 local cache_chars = {}
-local taux_dir = 'luatex-cache/luatexja'
 local path           = {
     localdir  = file.join(kpse.expand_var("$TEXMFVAR"), aux_dir),
     systemdir = file.join(kpse.expand_var("$TEXMFSYSVAR"), aux_dir),
index 90d317e..bd75dca 100644 (file)
   \advance\ltj@tempcnta by1
 \repeat
 
-\ltj@tempcnta="2000%"
+\ltj@tempcnta="2000%" General Punctuation
 \loop\ifnum\ltj@tempcnta<"2070%"
   \ltjsetparameter{kcatcode={\ltj@tempcnta,1}}%
   \advance\ltj@tempcnta by1
 \repeat
 
-\ltj@tempcnta="3000%"
+\ltj@tempcnta="2500%" 罫線
+\loop\ifnum\ltj@tempcnta<"2580%"
+  \ltjsetparameter{alxspmode={\ltj@tempcnta,0}}%
+  \advance\ltj@tempcnta by1
+\repeat
+
+\ltj@tempcnta="3000%" CJK Symbols and Punctuation
 \loop\ifnum\ltj@tempcnta<"3040%"
   \ltjsetparameter{kcatcode={\ltj@tempcnta,1}}%
   \advance\ltj@tempcnta by1
 \repeat
 
-\ltj@tempcnta="FF00%"
+\ltj@tempcnta="FF00%"  半角・全角形
 \loop\ifnum\ltj@tempcnta<"FFF0%"
   \ltjsetparameter{kcatcode={\ltj@tempcnta,1}}%
   \advance\ltj@tempcnta by1
index bd684f3..11a0d91 100644 (file)
Binary files a/test/test01-noembed.pdf and b/test/test01-noembed.pdf differ
index f5861d3..0afd076 100644 (file)
 \test{jis}
 \test{min}
 
+\par\vfill\eject
+{\noindent\bf\tengt ■dash}
+
+左から順に,U+2500(罫線),U+2015 (HORIZONTAL~BAR),U+2014 (EM~DASH)
+
+\def\test#1{\jfont\mx={psft:Ryumin-Light:jfm=#1}
+\par\noindent\hbox to 30pt{#1}%
+\hbox to 250pt{\mx  a──b――c——d}}
+
+\test{ujis}
+\test{jis}
+\test{min}
+
+{\catcode`\@=11 罫線のalxspmodeを3にしてみる(以前の設定値)
+\ltj@tempcnta="2500%" 罫線
+\loop\ifnum\ltj@tempcnta<"2580%"
+  \ltjsetparameter{alxspmode={\ltj@tempcnta,3}}%
+  \advance\ltj@tempcnta by1
+\repeat
+\test{ujis}
+\test{jis}
+\test{min}
+}
+
 \end