-- jfm-ujis.lua: LuaTeX-ja 標準 JFM
-- based on upnmlminr-h.tfm (a metric in UTF/OTF package used by upTeX).
+-- JIS X 4051:2004 では,行末の句読点や中点はベタなのでそれに従う
+-- kanjiskip: 0pt plus .25zw minus 0pt
+-- xkanjiskip: .25zw plus .25zw (or .0833zw) minus .125zw
+
+
luatexja.jfont.define_jfm {
dir = 'yoko',
zw = 1.0, zh = 1.0,
-
+ kanjiskip = {0.0, 0.25, 0},
+ xkanjiskip = {0.25, 0.25, .125},
[0] = {
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 }
+ -- [index] = { width, stretch, shrink, [priority, [ratio]] }
+ [1] = { 0.5 , 0.0, 0.5, 0, 1 },
+ [2] = {0, 0, 0},
+ [3] = { 0.25, 0.0, 0.25, 1, 1 },
+ [4] = {0, 0, 0},
+ [6] = {0, 0, 0},
+ [7] = {0, 0, 0},
+ [8] = {0, 0, 0},
+ [9] = {0, 0, 0},
}
},
align = 'right', left = 0.0, down = 0.0,
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [3] = { 0.25, 0.0, 0.25 }
+-- 3 のみ四分,あとは0
+ [0] = {0, 0, 0},
+ [1] = {0, 0, 0},
+ [2] = {0, 0, 0},
+ [3] = { 0.25, 0.0, 0.25, 1 },
+ [4] = {0, 0, 0},
+ [5] = {0, 0, 0},
+ [6] = {0, 0, 0},
+ [7] = {0, 0, 0},
+ [8] = {0, 0, 0},
+ [9] = {0, 0, 0},
}
},
[2] = { -- 閉じ括弧類
chars = {
- 'â\80\99', 'â\80\9d', 'ã\80\81', 'ã\80\89', 'ã\80\8b', 'ã\80\8d', 'ã\80\8f', 'ã\80\91', 'ã\80\95',
- 'ã\80\97', 'ã\80\99', 'ã\80\9f', 'ï¼\89', 'ï¼\8c', 'ï¼½', 'ï½\9d', 'ï½ '
+ '’', '”', '〉', '》', '」', '』', '】', '〕',
+ 'ã\80\97', 'ã\80\99', 'ã\80\9f', 'ï¼\89', 'ï¼½', 'ï½\9d', 'ï½ ', 'ã\80\81', 'ï¼\8c*'
},
align = 'left', left = 0.0, down = 0.0,
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [0] = { 0.5 , 0.0, 0.5 },
- [1] = { 0.5 , 0.0, 0.5 },
- [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 }
+-- 3 は四分, 2, 4, 9 は0, あとは0.5
+ [0] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [1] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [2] = {0, 0, 0},
+ [3] = { 0.25, 0.0, 0.25, 1, 1 },
+ [4] = {0, 0, 0},
+ [5] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [6] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [7] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [8] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [9] = {0, 0, 0},
}
},
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,
glue = {
- [0] = { 0.25, 0.0, 0.25 },
- [1] = { 0.25, 0.0, 0.25 },
- [2] = { 0.25, 0.0, 0.25 },
- [3] = { 0.5 , 0.0, 0.5 },
- [4] = { 0.25, 0.0, 0.25 },
- [5] = { 0.25, 0.0, 0.25 },
- [6] = { 0.25, 0.0, 0.25 },
- [7] = { 0.25, 0.0, 0.25 }
+-- 3 のみ 0.5,あとは0.25
+ [0] = { 0.25, 0.0, 0.25, 1, 1 },
+ [1] = { 0.25, 0.0, 0.25, 1, 1 },
+ [2] = { 0.25, 0.0, 0.25, 1, 1 },
+ [3] = { 0.5 , 0.0, 0.5 , 1, 0 },
+ [4] = { 0.25, 0.0, 0.25, 1, 1 },
+ [5] = { 0.25, 0.0, 0.25, 1, 1 },
+ [6] = { 0.25, 0.0, 0.25, 1, 1 },
+ [7] = { 0.25, 0.0, 0.25, 1, 1 },
+ [8] = { 0.25, 0.0, 0.25, 1, 1 },
+ [9] = { 0.25, 0.0, 0.25, 1, 1 },
}
},
align = 'left', left = 0.0, down = 0.0,
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [0] = { 0.5 , 0.0, 0.0 },
- [1] = { 0.5 , 0.0, 0.0 },
- [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 }
+-- 3 は.75, 2, 4 は0, あとは0.5
+ [0] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [1] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [3] = { 0.75, 0.0, 0.25, 1, -1/3 },
+ [5] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [6] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [7] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [8] = { 0.5 , 0.0, 0.5, 0, -1 },
+ [9] = { 0.5 , 0.0, 0.5, 0, -1 },
}
},
[5] = { -- ダッシュ
- chars = { 'â\80\95', 'â\80¥', 'â\80¦' },
+ chars = { 'â\80\94', 'â\80\95', 'â\80¥', 'â\80¦', 'ã\80³', 'ã\80´', 'ã\80µ', },
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 }
+ [1] = { 0.5 , 0.0, 0.5, 0, 1 },
+ [2] = {0, 0, 0},
+ [3] = { 0.25, 0.0, 0.25, 1, 1 },
+ [4] = {0, 0, 0},
+ [6] = {0, 0, 0},
+ [9] = {0, 0, 0},
},
kern = {
[5] = 0.0
},
[6] = { -- 感嘆符・疑問符
- chars = { '?', '!' },
+ chars = { '?', '!', '‼', '⁇', '⁈', '⁉', },
align = 'left', left = 0.0, down = 0.0,
width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [0] = { 0.5 , 0.0, 0.5 },
- [1] = { 0.5 , 0.0, 0.5 },
- [3] = { 0.25, 0.0, 0.25 },
- [7] = { 0.5 , 0.0, 0.5 },
+ [0] = { 0.5 , 0.0, 0.5, 0, 1 },
+ [1] = { 0.5 , 0.0, 0.5, 0, 1 },
+ [2] = {0, 0, 0},
+ [3] = { 0.75, 0.0, 0.25, 1, 1 },
+ [4] = {0, 0, 0},
+ [6] = {0, 0, 0},
+ [7] = { 0.5 , 0.0, 0.5, 0, 1 },
+ [8] = {0, 0, 0},
+ [9] = {0, 0, 0},
},
kern = {
[5] = 0.0
align = 'left', left = 0.0, down = 0.0,
width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
glue = {
- [1] = { 0.5 , 0.0, 0.5 },
- [3] = { 0.25, 0.0, 0.25 }
+ [1] = { 0.5 , 0.0, 0.5, 0, 1 },
+ [2] = {0, 0, 0},
+ [3] = { 0.25, 0.0, 0.25, 1, 1 },
+ [4] = {0, 0, 0},
+ [6] = {0, 0, 0},
+ [7] = {0, 0, 0},
+ [8] = {0, 0, 0},
+ [9] = {0, 0, 0},
+ }
+ },
+
+ [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, 0, 1 },
+ [2] = {0, 0, 0},
+ [3] = { 0.25, 0.0, 0.25, 1, 1 },
+ [4] = {0, 0, 0},
+ [6] = {0, 0, 0},
+ [9] = {0, 0, 0},
+ },
+ kern = {
+ [8] = 0.0
}
},
+ [9] = { -- 和字間隔
+ chars = {
+ ' '
+ },
+ align = 'left', left = 0.0, down = 0.0,
+ width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [0] = {0, 0, 0},
+ [1] = {0, 0, 0},
+ [2] = {0, 0, 0},
+ [3] = { 0.25, 0.0, 0.25, 1 },
+ [4] = {0, 0, 0},
+ [5] = {0, 0, 0},
+ [6] = {0, 0, 0},
+ [7] = {0, 0, 0},
+ [8] = {0, 0, 0},
+ [9] = {0, 0, 0},
+ },
+ },
+
+
[99] = { -- box末尾
chars = {'boxbdd', 'parbdd'},
+ glue = {
+ [3] = { 0.25, 0.0, 0.25, 1 },
+ }
},
-}
\ No newline at end of file
+}