[latex3-commits] [git/LaTeX3-latex3-luaotfload] harfnode-dev: Don't let GID 0 be nominal (a230539)

Marcel Fabian Krüger tex at 2krueger.de
Mon Oct 28 23:33:43 CET 2019


Repository : https://github.com/latex3/luaotfload
On branch  : harfnode-dev
Link       : https://github.com/latex3/luaotfload/commit/a230539617fd6042a18c80e112dc9ce5f6f12c16

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

commit a230539617fd6042a18c80e112dc9ce5f6f12c16
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Mon Oct 28 23:33:43 2019 +0100

    Don't let GID 0 be nominal


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

a230539617fd6042a18c80e112dc9ce5f6f12c16
 src/luaotfload-harf-define.lua | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua
index 0220e2b..335ef22 100644
--- a/src/luaotfload-harf-define.lua
+++ b/src/luaotfload-harf-define.lua
@@ -120,9 +120,11 @@ local function loadfont(spec)
     local characters = {}
     local nominals = {}
     for _, uni in next, unicodes do
-      local glyph = hbfont:get_nominal_glyph(uni) or 0
-      characters[uni] = glyph
-      nominals[glyph] = uni
+      local glyph = hbfont:get_nominal_glyph(uni)
+      if glyph then
+        characters[uni] = glyph
+        nominals[glyph] = uni
+      end
     end
 
     local xheight, capheight = 0, 0





More information about the latex3-commits mailing list