X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=src%2Fpatches%2Flltjfont.sty;h=79fee829212906622f44c1b3e7f22e4babda600f;hb=b9e760b4b499c30eda04b8b5fc094a61be1051d7;hp=1fdef28c62352e88d531b70a478a82226b650810;hpb=b8c305dd73c8b482090d16dbf0e336df6abb1a33;p=luatex-ja%2Fluatexja.git diff --git a/src/patches/lltjfont.sty b/src/patches/lltjfont.sty index 1fdef28..79fee82 100644 --- a/src/patches/lltjfont.sty +++ b/src/patches/lltjfont.sty @@ -3,9 +3,10 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjfont}[2016/04/01 Patch to NFSS2 for LuaTeX-ja] +\ProvidesPackage{lltjfont}[2017/03/20 Patch to NFSS2 for LuaTeX-ja] \def\ltj@chardef@text@cmd#1{% + \let\@ifdefinable\@@ifdefinable% \edef\ltj@chardef@text@cmd@name{\expandafter\@gobble\string#1}% \afterassignment\ltj@chardef@text@cmd@\ltj@tempcnta } @@ -23,7 +24,11 @@ } \ifdefined\UnicodeEncodingName + \let\ltj@temp@DeclareTextComposite=\DeclareTextComposite + \def\DeclareTextComposite#1#2#3#4{}% \input{tuenc.def} + \let\DeclareTextComposite=\ltj@temp@DeclareTextComposite + \expandafter\patchcmd\csname TU\string\textasteriskcentered\endcsname{\char}{\ltjalchar}{}{} \fi @@ -50,21 +55,36 @@ \ifdefined\cHT\else\newdimen\cHT\fi %\let\afont\font +\let\ystrutbox\strutbox \newbox\dstrutbox \newbox\tstrutbox \newbox\zstrutbox +\def\strutbox{% + \ifnum\ltjgetparameter{direction}=1 \dstrutbox % dtou + \else\ifnum\ltjgetparameter{direction}=3 \tstrutbox % tate + \else\ifnum\ltjgetparameter{direction}=11 \zstrutbox % utod + \else\ystrutbox % yoko + \fi\fi\fi +} \def\strut{\relax \ifnum\ltjgetparameter{direction}=1 % dtou \ifmmode\copy\dstrutbox\else\unhcopy\dstrutbox\fi \else\ifnum\ltjgetparameter{direction}=4 % yoko - \ifmmode\copy\strutbox\else\unhcopy\strutbox\fi - \else % tate and utod + \ifmmode\copy\ystrutbox\else\unhcopy\ystrutbox\fi + \else\ifnum\ltjgetparameter{direction}=3 % tate \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi - \fi\fi + \else % utod + \ifmmode\copy\zstrutbox\else\unhcopy\zstrutbox\fi + \fi\fi\fi } + +\def\ystrut{\relax\hbox{\yoko + \ifmmode\copy\ystrutbox\else\unhcopy\ystrutbox\fi}} \def\tstrut{\relax\hbox{\tate \ifmmode\copy\tstrutbox\else\unhcopy\tstrutbox\fi}} -\def\zstrut{\relax\hbox{\tate +\def\dstrut{\relax\hbox{\dtou + \ifmmode\copy\dstrutbox\else\unhcopy\dstrutbox\fi}} +\def\zstrut{\relax\hbox{\utod \ifmmode\copy\zstrutbox\else\unhcopy\zstrutbox\fi}} {% @@ -374,7 +394,7 @@ \baselineskip\f@linespread\baselineskip \normalbaselineskip\baselineskip \adjustbaseline - \setbox\strutbox\hbox{\yoko + \setbox\ystrutbox\hbox{\yoko \vrule\@width\z@ \@height.7\baselineskip \@depth.3\baselineskip}% \setbox\dstrutbox\hbox{\dtou @@ -383,7 +403,7 @@ \setbox\tstrutbox\hbox{\tate \vrule\@width\z@ \@height.5\baselineskip \@depth.5\baselineskip}% - \setbox\zstrutbox\hbox{\tate + \setbox\zstrutbox\hbox{\utod \vrule\@width\z@ \@height.7\baselineskip \@depth.3\baselineskip}% \let\size@update\relax}} @@ -480,7 +500,7 @@ \csname D@\k@encoding\endcsname \let\kenc@update\relax \let\ck@encoding\k@encoding - \edef\tmp@enc{'\luatexluaescapestring{\k@encoding}'} + \edef\tmp@enc{'\luatexluaescapestring{\k@encoding}'}% \directlua{luatexja.jfont.is_kyenc(\tmp@enc)}\ifin@% \let\cy@encoding\k@encoding \else @@ -595,9 +615,6 @@ } \@onlypreamble\romanprocess@table \@onlypreamble\kanjiprocess@table -\DeclareTextCommandDefault{\textunderscore}{% - \leavevmode\kern.06em - \vbox{\hrule\@width.3em}} %%%%%% LuaTeX-ja specific