diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx index 7800ec00a7e..89fe42b971e 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-user.dtx @@ -337,10 +337,17 @@ { \keys_if_exist:nnF { fontspec / options } {#1} { \@@_define_opentype_feature_group:n {#1} } + \keys_if_choice_exist:nnnT {fontspec} {#1} {#2} { \@@_warning:nxx {feature-option-overwrite} {#1} {#2} } - \@@_define_opentype_feature:nnn {#1}{#2}{#3} + + \exp_args:Nnnx \@@_define_opentype_feature:nnnnn {#1}{#2}{ \@@_strip_plus_minus:n {#3} }{#3}{} } + +\cs_new:Nn \@@_strip_plus_minus:n { \@@_strip_plus_minus_aux:Nq #1 \q_nil } +\cs_new:Npn \@@_strip_plus_minus_aux:Nq #1#2 \q_nil + { \str_case:nnF {#1} { {+} {#2} {-} {#2} } {#1#2} } + % \end{macrocode} % \end{macro} % @@ -359,11 +366,8 @@ %<debug> \typeout{::::::::::::::::::::^^J:: aliasfontfeature{#1}{#2}} \bool_set_false:N \l_@@_alias_bool - \clist_map_inline:nn - { fontspec, fontspec-opentype, fontspec-aat, fontspec-preparse, fontspec-preparse-external, - fontspec-preparse-nested, fontspec-renderer } + \clist_map_inline:Nn \g_@@_all_keyval_modules_clist { - \keys_if_exist:nnT {##1} {#1} { %<debug> \typeout{:::: Key~exists~##1~/~#1} @@ -387,16 +391,17 @@ \clist_map_inline:Nn \g_@@_all_keyval_modules_clist { - - \keys_if_exist:nnT {##1} {#1} + \keys_if_exist:nnT { ##1 / #1 } {#2} { +%<debug> \typeout{:::: Keyval~exists~##1~/~#1~=~#2} \bool_set_true:N \l_@@_alias_bool - \keys_define:nn { ##1 / #1 } { #3 .meta:n = {#2} } + \keys_define:nn { ##1 / #1 } + { #3 .code:n = { \keys_set:nn {##1} { #1 = {#2} } } } } } \bool_if:NF \l_@@_alias_bool - { \@@_warning:nx {rename-feature-not-exist} {#1} } + { \@@_warning:nx {rename-feature-not-exist} {#1/#2} } } % \end{macrocode} % \end{macro} @@ -437,7 +442,7 @@ % \end{macro} -% \begin{macro}{\IfFontFeaturesTF} +% \begin{macro}{\IfFontFeatureActiveTF} % \begin{macrocode} \DeclareDocumentCommand \IfFontFeatureActiveTF {mmm} { |