[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Proper missing glyph warnings in harf mode (fd36114)

Marcel Fabian Krüger tex at 2krueger.de
Wed Apr 8 11:47:14 CEST 2020


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

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

commit fd36114d03a38218f8d0ef3eaca69ca95681a25b
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Wed Apr 8 11:12:49 2020 +0200

    Proper missing glyph warnings in harf mode


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

fd36114d03a38218f8d0ef3eaca69ca95681a25b
 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 4d7f359..cbc6877 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -775,8 +775,14 @@ local function tonodes(head, node, run, glyphs)
           -- glyph, keep the node char unchanged. Helps with primitives that
           -- take characters as input but actually work on glyphs, like
           -- `\rpcode`.
-          if character.commands or not oldcharacter
-                                or character.index ~= oldcharacter.index then
+          if not oldcharacter then
+            if gid == 0 then
+              local new = copynode(node)
+              head, node = insertafter(head, node, new)
+            end
+            setchar(node, char)
+          elseif character.commands
+              or character.index ~= oldcharacter.index then
             setchar(node, char)
           end
           local xoffset = (rtl and -glyph.x_offset or glyph.x_offset) * scale





More information about the latex3-commits mailing list.