Skip to content

Commit

Permalink
fix mangled lang code
Browse files Browse the repository at this point in the history
thanks Ulrike!

closes #513
  • Loading branch information
wspr committed May 2, 2024
1 parent 3165d41 commit 505ff04
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
6 changes: 3 additions & 3 deletions fontspec-code-feat-opentype.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@
\@@_warning:nx {language-not-exist} {#1}
\clist_set:Nn \l_tmpa_clist {#2}
\clist_get:NN \l_tmpa_clist \l_@@_lang_tl
\exp_args:Noo \@@_check_script:NnF \l_@@_fontface_cs_tl \l_@@_script_tl
\exp_args:Noo \@@_check_lang:NnF \l_@@_fontface_cs_tl \l_@@_lang_tl
{
\tl_set:Nn \l_@@_script_name_tl {#1}
\tl_set:Nn \l_@@_lang_name_tl {#1}
\int_set:Nn \l_@@_language_int {\l_@@_strnum_int}
\tl_gset:Nx \g_@@_single_feat_tl { language=####1 }
\tl_gset:Nx \g_@@_single_feat_tl { language=\l_@@_lang_tl }
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion fontspec-code-opentype.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
% The script used is whatever's held in \cmd\l_@@_script_int. By default, that's the
% number corresponding to `|latn|'.
% \begin{macrocode}
\prg_new_conditional:Nnn \@@_check_lang:Nn {TF}
\prg_new_conditional:Nnn \@@_check_lang:Nn {TF,F}
{
\@@_check_lang:NnnTF #1 {#2} {\l_@@_script_tl} {\prg_return_true:} {\prg_return_false:}
}
Expand Down
6 changes: 6 additions & 0 deletions testfiles/script-lang-chinese.luatex.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
TU/FandolHei(0)/m/n:
[FandolHei-Regular.otf]:mode=node;script=hani;language=ZHS;+tlig;family=rm;
***************
Compilation 1 of test file completed with exit status 0
13 changes: 13 additions & 0 deletions testfiles/script-lang-chinese.lvt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

\input{fontspec-testsetup.tex}

\usepackage[english]{babel}
\babelfont[chinese]{rm}[
Extension=.otf,
UprightFont=*-Regular,
BoldFont=*-Bold
]{FandolHei}

\begin{document}
\foreignlanguage{chinese}{你好世界\CURRNFSS}
\end{document}
6 changes: 6 additions & 0 deletions testfiles/script-lang-chinese.tlg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This is a generated file for the l3build validation system.
Don't change this file in any respect.
TU/FandolHei(0)/m/n:
"[FandolHei-Regular.otf]/OT:script=hani;language=ZHS;mapping=tex-text;"
***************
Compilation 1 of test file completed with exit status 0

0 comments on commit 505ff04

Please sign in to comment.