From 109538bd300312a2121858dc0fb2c86e063d258c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Kr=C3=BCger?= Date: Fri, 24 Jun 2022 12:30:20 +0200 Subject: [PATCH] Use explicit name: lookups for LuaTeX (#462) --- fontspec-code-internal.dtx | 3 ++- testfiles/fontload-fontname.luatex.tlg | 16 ++++++++++++++ testfiles/fontload-fontname.lvt | 30 ++++++++++++++++++++++++++ testfiles/fontload-fontname.tlg | 5 +++++ 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 testfiles/fontload-fontname.luatex.tlg create mode 100644 testfiles/fontload-fontname.lvt create mode 100644 testfiles/fontload-fontname.tlg diff --git a/fontspec-code-internal.dtx b/fontspec-code-internal.dtx index 3295b329..0758f79b 100644 --- a/fontspec-code-internal.dtx +++ b/fontspec-code-internal.dtx @@ -288,7 +288,8 @@ % \begin{macrocode} \cs_new:Nn \@@_font_is_name: { - \cs_set_eq:NN \@@_fontname_wrap:n \use:n +% \cs_set_eq:NN \@@_fontname_wrap:n \use:n +% \cs_set:Npn \@@_fontname_wrap:n ##1 { name: ##1 } } % \end{macrocode} % diff --git a/testfiles/fontload-fontname.luatex.tlg b/testfiles/fontload-fontname.luatex.tlg new file mode 100644 index 00000000..7820da8a --- /dev/null +++ b/testfiles/fontload-fontname.luatex.tlg @@ -0,0 +1,16 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +RM: +TU/TeXGyrePagella(0)/m/n: + name:TeXGyrePagella:mode=node;script=latn;language=dflt;+tlig; +BF: +TU/TeXGyrePagella(0)/b/n: + name:TeXGyrePagella/B:mode=node;script=latn;language=dflt;+tlig; +IT: +TU/TeXGyrePagella(0)/m/it: + name:TeXGyrePagella/I:mode=node;script=latn;language=dflt;+tlig; +BFIT: +TU/TeXGyrePagella(0)/b/it: + name:TeXGyrePagella/BI:mode=node;script=latn;language=dflt;+tlig; +*************** +Compilation 1 of test file completed with exit status 0 diff --git a/testfiles/fontload-fontname.lvt b/testfiles/fontload-fontname.lvt new file mode 100644 index 00000000..6436954a --- /dev/null +++ b/testfiles/fontload-fontname.lvt @@ -0,0 +1,30 @@ +\input{fontspec-testsetup.tex} + +\usepackage{fontspec} + +\begin{document} +% Only test in LuaTeX since in XeTeX it's unclear if the fonts ar available +\LUATEXONLY + +\setmainfont{TeX Gyre Pagella} + +\MSG{RM:} +`hello' 123 +\CURRNFSS + +\MSG{BF:} +\bfseries +`hello' 123 +\CURRNFSS + +\MSG{IT:} +\mdseries\itshape +`hello' 123 +\CURRNFSS + +\MSG{BFIT:} +\bfseries +`hello' 123 +\CURRNFSS + +\end{document} diff --git a/testfiles/fontload-fontname.tlg b/testfiles/fontload-fontname.tlg new file mode 100644 index 00000000..30f7a65a --- /dev/null +++ b/testfiles/fontload-fontname.tlg @@ -0,0 +1,5 @@ +This is a generated file for the l3build validation system. +Don't change this file in any respect. +*** LuaTeX-only test *** +*************** +Compilation 1 of test file completed with exit status 0