summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fontspec/fontspec-patches.sty
diff options
context:
space:
mode:
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>