OSDN Git Service
(root)
/
luatex-ja
/
luatexja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
692cf54
)
\jfont: support control symbol
author
Hironori Kitagawa
<h_kitagawa2001@yahoo.co.jp>
Sat, 20 Aug 2022 00:11:22 +0000
(09:11 +0900)
committer
Hironori Kitagawa
<h_kitagawa2001@yahoo.co.jp>
Sat, 20 Aug 2022 00:11:22 +0000
(09:11 +0900)
src/ltj-jfont.lua
patch
|
blob
|
history
diff --git
a/src/ltj-jfont.lua
b/src/ltj-jfont.lua
index
25a3122
..
9f70cc1
100644
(file)
--- 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 ''
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)
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
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
jfm_spec = nil
end
end