From: Hironori Kitagawa Date: Sat, 20 Aug 2022 00:11:22 +0000 (+0900) Subject: \jfont: support control symbol X-Git-Tag: 20221002.0~9^2~14 X-Git-Url: http://git.osdn.net/view?p=luatex-ja%2Fluatexja.git;a=commitdiff_plain;h=ed669eb0cd58413788b611462a3208c88c094c89 \jfont: support control symbol --- diff --git a/src/ltj-jfont.lua b/src/ltj-jfont.lua index 25a3122..9f70cc1 100644 --- a/src/ltj-jfont.lua +++ b/src/ltj-jfont.lua @@ -305,8 +305,9 @@ do cstemp = csname:sub( (utfbyte(csname,1,1) == tex.escapechar) and 2 or 1, -1) cstemp = cstemp:sub(1, ((cstemp:sub(-1,-1)==' ') and (cstemp:len()>=2)) and -2 or -1) global_flag = g and '\\global' or '' - tex.sprint(cat_lp, '\\expandafter\\font\\csname ', - (cstemp==' ') and '\\space' or cstemp, '\\endcsname') + tex.sprint(cat_lp, '\\expandafter\\font\\csname ') + tex.sprint(-2, (cstemp==' ') and '\\space' or cstemp) + tex.sprint(cat_lp, '\\endcsname') end luatexbase.create_callback("luatexja.define_jfont", "data", function (ft, fn) return ft end) @@ -347,9 +348,9 @@ do fmtable = luatexbase.call_callback("luatexja.define_jfont", fmtable, fn) font_metric_table[fn]=fmtable - tex.sprint(cat_lp, global_flag, '\\protected\\expandafter\\def\\csname ', - (cstemp==' ') and '\\space' or cstemp, '\\endcsname{\\ltj@cur'.. - (jfm_dir == 'yoko' and 'j' or 't') .. 'fnt', fn, '\\relax}') + tex.sprint(cat_lp, global_flag, '\\protected\\expandafter\\def\\csname ') + tex.sprint(-2, (cstemp==' ') and '\\space' or cstemp) + tex.sprint(cat_lp, '\\endcsname{\\ltj@cur'.. (jfm_dir == 'yoko' and 'j' or 't') .. 'fnt', fn, '\\relax}') jfm_spec = nil end end