X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fpatches%2Flltjfont.sty;h=515e0a0f7c5e2b70a0c91babc9fe616cb6fbbd7a;hb=6eb03a9acfcdc7570fff60cb9aa3713a69a16340;hp=d1d2b68cd4c39fc533ba4ed45ec7e9ac5f2df016;hpb=1b1d3c33842226350f9ec85ff0f4cd6d793ccc56;p=luatex-ja%2Fluatexja.git diff --git a/src/patches/lltjfont.sty b/src/patches/lltjfont.sty index d1d2b68..515e0a0 100644 --- a/src/patches/lltjfont.sty +++ b/src/patches/lltjfont.sty @@ -3,7 +3,7 @@ % \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{lltjfont}[2011/11/22 Patch to NFSS2 for LuaLaTeX-ja] +\ProvidesPackage{lltjfont}[2013/01/01 Patch to NFSS2 for LuaLaTeX-ja] \let\k@encoding\@empty \let\ck@encoding\@empty @@ -444,34 +444,35 @@ \newif\if@tempswz \DeclareRobustCommand\romanfamily[1]{\edef\f@family{#1}} \DeclareRobustCommand\kanjifamily[1]{\edef\k@family{#1}} +% \notkfam@list@: list of non-defined kanji families under +% \kfam@list@: list of kanji families under , defined in a .fd file \DeclareRobustCommand\fontfamily[1]{% \@notkfamfalse\@notffamfalse\edef\tmp@item{{#1}}% \ifcsname \k@encoding+#1\endcsname % if \k@encoding+#1 is already defined \edef\k@family{#1}% - \else - \@notkfamtrue - % \ifcsname kfam@list@\k@encoding\endcsname\else - % \expandafter\gdef\csname kfam@list@\k@encoding\endcsname{}% - % \expandafter\gdef\csname notkfam@list@\k@encoding\endcsname{}% - % \fi - % \edef\@templist{\@nameuse{kfam@list@\k@encoding}}% - % \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% - % \ifin@\edef\k@family{#1}\else% - % \edef\@templist{\@nameuse{notkfam@list@\k@encoding}}% - % \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% - % \ifin@\@notkfamtrue\else% - % \def\@temp##1+{\lowercase{\def\@@temp{##1}}}\expandafter\@temp\k@encoding+% - % \message{(I search kanjifont definition file: \@@temp#1.fd)}% - % \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% - % \if@tempswz - % \expandafter\xdef\csname kfam@list@\k@encoding\endcsname - % {\@nameuse{kfam@list@\k@encoding}\fam@elt<#1>}\edef\k@family{#1}% - % \else - % \expandafter\xdef\csname notkfam@list@\k@encoding\endcsname - % {\@nameuse{notkfam@list@\k@encoding}\fam@elt<#1>}\@notkfamtrue% - % \fi - % \fi - % \fi + \else % search font definition file... + \ifcsname kfam@list@\k@encoding\endcsname\else + \expandafter\gdef\csname kfam@list@\k@encoding\endcsname{}% + \expandafter\gdef\csname notkfam@list@\k@encoding\endcsname{}% + \fi + \edef\@templist{\@nameuse{kfam@list@\k@encoding}}% + \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% + \ifin@\edef\k@family{#1}\else% + \edef\@templist{\@nameuse{notkfam@list@\k@encoding}}% + \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% + \ifin@\@notkfamtrue\else% + \def\@temp##1+{\lowercase{\def\@@temp{##1#1.fd}}}\expandafter\@temp\k@encoding+% + \message{(I search kanjifont definition file: \@@temp)}% + \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% + \if@tempswz + \expandafter\xdef\csname kfam@list@\k@encoding\endcsname + {\@nameuse{kfam@list@\k@encoding}\fam@elt<#1>}\edef\k@family{#1}% + \else + \expandafter\xdef\csname notkfam@list@\k@encoding\endcsname + {\@nameuse{notkfam@list@\k@encoding}\fam@elt<#1>}\@notkfamtrue% + \fi + \fi + \fi \fi \ifcsname \f@encoding+#1\endcsname \edef\f@family{#1}% @@ -487,8 +488,8 @@ \expandafter\expandafter\expandafter\inlist@\expandafter\tmp@item\expandafter{\@templist}% \ifin@\@notffamtrue\else \def\@temp##1+{\lowercase{\def\@@temp{##1#1.fd}}}\expandafter\@temp\f@encoding+% - \message{(I search font definition file. \@@temp)}% - \IfFileExists{\@@temp}{\@tempswztrue}{\@tempswzfalse}% + \message{(I search font definition file: \@@temp)}% + \IfFileExists{\@@temp#1.fd}{\@tempswztrue}{\@tempswzfalse}% \if@tempswz \expandafter\xdef\csname ffam@list@\f@encoding\endcsname {\@nameuse{ffam@list@\f@encoding}\fam@elt<#1>}\edef\f@family{#1}% @@ -581,6 +582,7 @@ \let\extract@font\extract@afont \fi \let\getjfont\font@name} + \def\extract@jfont{% \get@external@font \expandafter\globaljfont\font@name\external@font\relax @@ -620,9 +622,9 @@ \xdef\font@name{\csname \string#2/\ssf@size\endcsname}% \pickup@jfont \edef\math@fonts{\math@fonts\ltj@setpar@global% - \ltj@@set@stackfont#1,\textfont@name:{mjtext}% - \ltj@@set@stackfont#1,\scriptfont@name:{mjscr}% - \ltj@@set@stackfont#1,\font@name:{mjss}% + \ltj@@set@stackfont#1,\textfont@name:{MJT}% + \ltj@@set@stackfont#1,\scriptfont@name:{MJS}% + \ltj@@set@stackfont#1,\font@name:{MJSS}% }% }