Skip to content

Commit

Permalink
Use explicit name: lookups for LuaTeX (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
zauguin committed Jun 24, 2022
1 parent 8e3494e commit 109538b
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fontspec-code-internal.dtx
Expand Up @@ -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}
%
Expand Down
16 changes: 16 additions & 0 deletions 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
30 changes: 30 additions & 0 deletions 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}
5 changes: 5 additions & 0 deletions 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

0 comments on commit 109538b

Please sign in to comment.