[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Errors instead of warnings (807c2ec)

Marcel Fabian Krüger tex at 2krueger.de
Sat Jun 6 01:48:29 CEST 2020


Repository : https://github.com/latex3/luaotfload
On branch  : dev
Link       : https://github.com/latex3/luaotfload/commit/807c2ecd87e4edec3dfab304e5e4326dd4af1820

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

commit 807c2ecd87e4edec3dfab304e5e4326dd4af1820
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sat Jun 6 01:45:17 2020 +0200

    Errors instead of warnings


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

807c2ecd87e4edec3dfab304e5e4326dd4af1820
 src/luaotfload-harf-plug.lua | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index 484a3b7..636b909 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -556,9 +556,15 @@ function shape(head, firstnode, run)
     if not fontdata.shaper_warning then
       local shaper = shapers[1]
       if shaper then
-        logreport("both", 0, "harf", "Failed to shape text in font %q with shaper %q.\nMaybe you should try the default shaper instead?", fontdata.name, shaper)
+        tex.error("luaotfload | harf : Shaper failed", {
+          string.format("You asked me to use shaper %q to shape", shaper),
+          string.format("the font %q", fontdata.name),
+          "but the shaper failed. This probably means that either the shaper is not",
+          "available or the font is not compatible.",
+          "Maybe you should try the default shaper instead?"
+        })
       else
-        logreport("both", 0, "harf", "All shapers failed for font %q.", fontdata.name)
+        tex.error(string.format("luaotfload | harf : All shapers failed for font %q.", fontdata.name))
       end
       fontdata.shaper_warning = true -- Only warn once for every font
     end





More information about the latex3-commits mailing list.