summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-09-13 22:53:04 +0000
committerKarl Berry <karl@freefriends.org>2011-09-13 22:53:04 +0000
commite646dedf9c5e492e2598cdfd13cda820ad2f62a7 (patch)
tree081a6eab5571d8fbe3292abda0a0064d9c616422 /Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
parent2ff31e7482486eeb8c9d13664a15c30fc293da95 (diff)
fontspec 2.2 (13sep11)
git-svn-id: svn://tug.org/texlive/trunk@23936 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty')
-rw-r--r--Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty20
1 files changed, 14 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
index 4d0c28169ff..72b3dfc6bd4 100644
--- a/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
+++ b/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
@@ -14,7 +14,7 @@
%%
%%
\ProvidesPackage{fontspec-patches}
- [2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX]
+ [2011/09/13 v2.2 Advanced font selection for XeLaTeX/LuaLaTeX]
\ExplSyntaxOn
@@ -37,21 +37,21 @@
\hyphenchar\font
\fi}{}{}}
\def\xlx@defaulthyphenchar{`\-}
-\cs_new:Npn \fontspec_visible_space: {
+\cs_new:Nn \fontspec_visible_space: {
\font_glyph_if_exist:NnTF \font {"2423}
{\char"2423\relax}
{\fontspec_visible_space_fallback:}
}
-\cs_new:Npn \fontspec_visible_space_fallback: {
+\cs_new:Nn \fontspec_visible_space_fallback: {
{
- \usefont{\zf@enc}{lmtt}{\f@series}{\f@shape}
+ \usefont{\g_fontspec_encoding_tl}{lmtt}{\f@series}{\f@shape}
\textvisiblespace
}
}
\group_begin:
-\char_make_active:n{"20}%
+\char_set_catcode_active:n{"20}%
\cs_gset:Npn\fontspec_print_visible_spaces:{%
-\char_make_active:n{"20}%
+\char_set_catcode_active:n{"20}%
\cs_set_eq:NN^^20\fontspec_visible_space:%
}%
\group_end:
@@ -101,6 +101,14 @@
\cs_set_eq:NN \lst@visiblespace \fontspec_visible_space:
}{}
}
+\RenewDocumentCommand \oldstylenums {m}
+ {
+ { \addfontfeature{Numbers=OldStyle} #1 }
+ }
+\NewDocumentCommand \liningnums {m}
+ {
+ { \addfontfeature{Numbers=Lining} #1 }
+ }
%%
%% Copyright 2004--2011 Will Robertson <wspr81@gmail.com>
%% Copyright 2009--2010 Khaled Hosny <khaledhosny@eglug.org>