diff options
author | Karl Berry <karl@freefriends.org> | 2012-12-15 23:29:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-12-15 23:29:41 +0000 |
commit | 4d9e3bb3fa14ad6e2fda22af339c194eefab2151 (patch) | |
tree | ed322a65b8680e1e9c21c24e487fde8862e92b6a /Master/texmf-dist/tex/latex/zxjafbfont | |
parent | 04814f59a9deac2fa781d5746948edf97ed19cc1 (diff) |
zxjafbfont (15dec12)
git-svn-id: svn://tug.org/texlive/trunk@28539 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/zxjafbfont')
-rw-r--r-- | Master/texmf-dist/tex/latex/zxjafbfont/zxjafbfont.sty | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/zxjafbfont/zxjafbfont.sty b/Master/texmf-dist/tex/latex/zxjafbfont/zxjafbfont.sty new file mode 100644 index 00000000000..762a0d5ec58 --- /dev/null +++ b/Master/texmf-dist/tex/latex/zxjafbfont/zxjafbfont.sty @@ -0,0 +1,63 @@ +% +% zxjafbfont.sty +% + +%% package declaration +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{zxjafbfont}[2011/02/20 v0.2] + +%% preparations +\def\zxjx@pkgname{zxjafbfont} +\def\zxjx@error{\PackageError\zxjx@pkgname} +% +\RequirePackage{xeCJK} + +%%------ User interface + +%%<*> \setCJKfallbackfamily{<CJK_family_name>} +\newcommand*\setCJKfallbackfamily[1]{% + \let\CJKsymbol\zxjx@CJKsymbol + \edef\zxjx@fb@family{#1}} + +%%<*> \unsetCJKfallbackfamily +\newcommand*\unsetCJKfallbackfamily{% + \let\CJKsymbol\zxjx@org@CJKsymbol + \let\zxjx@fb@family\relax} + +%% \zxjx@fb@family +\let\zxjx@fb@family\relax + +%%------ Patch to xeCJK procedures + +%% \zxjx@enter@local +\def\zxjx@enter@local{% + \bgroup \let\zxjx@maybe@egroup\egroup + \zxjx@revoke@ingress} +\let\zxjx@maybe@egroup\@empty +\def\zxjx@preto@ictoks#1#2#3{% + \chardef\zxjx@x=#1\chardef\zxjx@y=#2\relax + \XeTeXinterchartoks\zxjx@x\zxjx@y\expandafter{% + \expandafter#3\the\XeTeXinterchartoks\zxjx@x\zxjx@y}} +\@for\zxjx@a:=1,2,3\do{% + \@for\zxjx@b:=0,1,2,3,4,5,6,255\do{% + \zxjx@preto@ictoks\zxjx@a\zxjx@b{\zxjx@maybe@egroup}}} +\def\zxjx@revoke@ingress{% + % Segfaults would occur unless \relax is there... (why?) + \XeTeXinterchartoks 255 1{\relax}% + \XeTeXinterchartoks 255 2{\relax}% + \XeTeXinterchartoks 255 3{\relax}} +\chardef\zxjx@geta="3013 + +%% \zxjx@CJKsymbol +\def\zxjx@CJKsymbol#1{% + \zxjx@enter@local + \chardef\zxjx@uc=`#1\relax + \unless\iffontchar\font\zxjx@uc + \CJKfamily\zxjx@fb@family \xeCJK@setfont + \fi + \zxjx@uc} +\let\zxjx@org@CJKsymbol\CJKsymbol + +%%------ all done +\endinput +%% EOF |