[luatex] LuaTeX 1.10.1-svn7138 breaks fontspec package

Khaled Hosny dr.khaled.hosny at gmail.com
Wed May 1 03:10:31 CEST 2019

On Wed, May 01, 2019 at 02:55:18AM +0200, Khaled Hosny wrote:
> Hi all,
> Something in the svn 7138 revision breaks fontspec package. In the
> attached document the first line is fine, but the second line will give
> the warning:
> Package fontspec Warning: Font "amiri-regular" does not contain requested
> (fontspec)                Script "Latin".
> It seems in the second line fontspec is checking with an empty font
> csname. I couldn’t manage to come with a plain TeX file that shows the
> issue, but the warning goes away if I revert this chunk:
> https://github.com/TeX-Live/luatex/commit/e4181e6126b060645f257ec64043bc9eae699576#diff-a34a3b72620549296a59c3bcb1010ff8L218

Still no plain TeX document, but the attached patch fixes the issue; “t”
should be flushed only if it isn’t the same string number as “d”
otherwise the code is flushing the already used string.

-------------- next part --------------
diff --git a/source/texk/web2c/luatexdir/tex/texdeffont.c b/source/texk/web2c/luatexdir/tex/texdeffont.c
index 79e279ffe..7b3ba35a3 100644
--- a/source/texk/web2c/luatexdir/tex/texdeffont.c
+++ b/source/texk/web2c/luatexdir/tex/texdeffont.c
@@ -226,6 +226,8 @@ void tex_def_font(small_number a)
     if (!d) {
         /*tex We have a new string. */
         cs_text(font_id_base + f) = t;
+    } else if (t == d) {
+        /*tex The same string number, do nothing */
     } else if (str_eq_str(d,t)){
         /*tex We have the same string. */

More information about the luatex mailing list