diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty index e57739d0c21..ba13695352b 100644 --- a/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty +++ b/Master/texmf-dist/tex/luatex/luatexja/luatexja-core.sty @@ -137,7 +137,6 @@ \newattribute\ltj@icflag % attribute for italic correction \newattribute\ltj@curjfnt % index for ``current horizontal Japanese font'' \newattribute\ltj@curtfnt % index for ``current vertical Japanese font'' -\newattribute\ltj@origchar % \newattribute\ltj@charclass % \newattribute\ltj@charcode % \newattribute\ltj@autospc % attribute for autospacing @@ -147,12 +146,12 @@ \newattribute\ltj@tablshift % attribute for talbaselineshift \newattribute\ltj@tkblshift % attribute for tjabaselineshift \newattribute\jfam % index for current jfam +\newattribute\ltj@vert@ori % <=0: UAX#50, >0: always upright \newattribute\ltj@dir \newlanguage\ltj@@japanese \ltj@dir\z@ \ltj@icflag\z@ -\ltj@origchar\z@ \ltj@charclass\z@ \ltj@curjfnt\m@ne \ltj@curtfnt\m@ne @@ -477,14 +476,20 @@ %%%%%%%% \ltjalchar<number>, \ltjjachar<number> \let\ltj@@origchar=\char -\protected\def\ltj@alljachar{\relax - \csname ltj@kcat0\endcsname\z@ - \csname ltj@kcat1\endcsname\z@ - \csname ltj@kcat2\endcsname\z@ - \csname ltj@kcat3\endcsname\z@ - \csname ltj@kcat4\endcsname\z@ - \csname ltj@kcat5\endcsname\z@ - \csname ltj@kcat6\endcsname\z@} +\newluafunction\ltj@alljachar@inner +\directlua{ + local t, set_attr = lua.get_functions_table(), tex.setattribute + local get_attr, floor = tex.getattribute, math.floor + local attr_curjfnt = luatexbase.attributes['ltj@curjfnt'] + local lang_ja = luatexja.lang_ja + t[\the\ltj@alljachar@inner] = function() + font.current(get_attr(attr_curjfnt)); tex.language=lang_ja; + for i=0,6 do + set_attr(luatexbase.attributes['ltj@kcat' .. floor(i)],0) + end + end +} +\protected\def\ltj@alljachar{\luafunction\ltj@alljachar@inner} \protected\def\ltj@allalchar{\relax \csname ltj@kcat0\endcsname="7FFFFFFF %" \csname ltj@kcat1\endcsname="7FFFFFFF %" |