[latex3-commits] [git/LaTeX3-latex3-fontspec] main: Use explicit name: lookups for LuaTeX (#462) (109538b)

GitHub noreply at github.com
Fri Jun 24 12:30:20 CEST 2022


Repository : https://github.com/latex3/fontspec
On branch  : main
Link       : https://github.com/latex3/fontspec/commit/109538bd300312a2121858dc0fb2c86e063d258c

>---------------------------------------------------------------

commit 109538bd300312a2121858dc0fb2c86e063d258c
Author: Marcel Krüger <tex at 2krueger.de>
Date:   Fri Jun 24 12:30:20 2022 +0200

    Use explicit name: lookups for LuaTeX (#462)


>---------------------------------------------------------------

109538bd300312a2121858dc0fb2c86e063d258c
 fontspec-code-internal.dtx                         |  3 ++-
 testfiles/fontload-fontname.luatex.tlg             | 16 ++++++++++++
 testfiles/fontload-fontname.lvt                    | 30 ++++++++++++++++++++++
 ...luatex-subs.xetex.tlg => fontload-fontname.tlg} |  0
 4 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/fontspec-code-internal.dtx b/fontspec-code-internal.dtx
index 3295b32..0758f79 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
+%<XE>  \cs_set_eq:NN \@@_fontname_wrap:n \use:n
+%<LU>  \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 0000000..7820da8
--- /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 0000000..6436954
--- /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/luatex-subs.xetex.tlg b/testfiles/fontload-fontname.tlg
similarity index 100%
copy from testfiles/luatex-subs.xetex.tlg
copy to testfiles/fontload-fontname.tlg





More information about the latex3-commits mailing list.