diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-24 22:12:49 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-24 22:12:49 +0000 |
commit | 28ce99e6ad7fc066bae92899fa880557fb85b35a (patch) | |
tree | c6057c4c24337762c24bb5e4cc36ea37d247ff68 /Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx | |
parent | 6ce7a289e11addd60648c7e43493ae946a1f2d73 (diff) |
fontspec (24jan19)
git-svn-id: svn://tug.org/texlive/trunk@49809 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx b/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx index be5155de476..88a107896f6 100644 --- a/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx +++ b/Master/texmf-dist/source/latex/fontspec/fontspec-code-fontload.dtx @@ -12,13 +12,13 @@ % \begin{macrocode} \cs_set:Npn \@@_primitive_font_set:Nnn #1#2#3 { - \font #1 = #2 ~at~ #3 \scan_stop: + \font #1 = #2 ~at~ \dim_eval:n {#3} \scan_stop: } % \end{macrocode} % \begin{macrocode} \cs_set:Npn \@@_primitive_font_gset:Nnn #1#2#3 { - \global \font #1 = #2 ~at~ #3 \scan_stop: + \global \font #1 = #2 ~at~ \dim_eval:n {#3} \scan_stop: } % \end{macrocode} % \end{macro} @@ -45,13 +45,32 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}[pTF]{\@@_primitive_font_set:NnnTF,\@@_primitive_font_gset:NnnTF} +% \begin{macrocode} +\prg_set_conditional:Nnn \@@_primitive_font_set:Nnn {TF,T,F} + { + \@@_primitive_font_set:Nnn #1 {#2} {#3} + \@@_primitive_font_if_null:NTF #1 {\prg_return_false:} {\prg_return_true:} + } +\prg_set_conditional:Nnn \@@_primitive_font_gset:Nnn {TF,T,F} + { + \@@_primitive_font_gset:Nnn #1 {#2} {#3} + \@@_primitive_font_if_null:NTF #1 {\prg_return_false:} {\prg_return_true:} + } +\cs_set:Npn \@@_primitive_font_set:Onn { \exp_last_unbraced:No \@@_primitive_font_set:Nnn } +\cs_set:Npn \@@_primitive_font_set:OnnF { \exp_last_unbraced:No \@@_primitive_font_set:NnnF } +\cs_set:Npn \@@_primitive_font_gset:Onn { \exp_last_unbraced:No \@@_primitive_font_gset:Nnn } +\cs_set:Npn \@@_primitive_font_gset:OnnF { \exp_last_unbraced:No \@@_primitive_font_gset:NnnF } +% \end{macrocode} +% \end{macro} +% % \begin{macro}[TF]{\@@_primitive_font_if_exist:n} % \begin{macrocode} \prg_set_conditional:Nnn \@@_primitive_font_if_exist:n {TF,T,F} { \group_begin: \@@_font_suppress_not_found_error: - \@@_primitive_font_set:Nnn \l_@@_primitive_font {#1} {10pt} + \@@_primitive_font_set:Nnn \l_@@_primitive_font {#1} { \f@size pt - 1sp } \@@_primitive_font_if_null:NTF \l_@@_primitive_font { \group_end: \prg_return_false: } { \group_end: \prg_return_true: } @@ -81,6 +100,18 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_primitive_font_get_name:N} +% \begin{macro}{\@@_primitive_font_current_name:} +% \begin{macrocode} +\cs_new_eq:NN \@@_primitive_font_get_name:N \fontname +\cs_new:Npn \@@_primitive_font_current_name: + { + \@@_primitive_font_get_name:N \tex_font:D + } +% \end{macrocode} +% \end{macro} +% \end{macro} +% % \iffalse % \begin{macrocode} %</fontspec> |