[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Allow displaying odd glyph nodes (8db2ac4)

Marcel Fabian Krüger tex at 2krueger.de
Thu Jul 9 21:20:59 CEST 2020


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

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

commit 8db2ac460ae7b5254272e43dda18ed93c2852f78
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Jul 9 21:20:16 2020 +0200

    Allow displaying odd glyph nodes


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

8db2ac460ae7b5254272e43dda18ed93c2852f78
 src/luaotfload-harf-plug.lua | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index 636b909..877b152 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -1011,7 +1011,16 @@ local utfchar = utf8.char
 local function get_glyph_info(n)
   n = todirect(n)
   local props = properties[n]
-  return props and props.glyph_info or utfchar(getchar(n)):gsub('\0', '^^@')
+  local info = props and props.glyph_info
+  if info then return info end
+  local c = getchar(n)
+  if c == 0 then
+    return '^^@'
+  elseif c < 0x11000 then
+    return utfchar(c)
+  else
+    return string.format("^^^^^^%06X", c)
+  end
 end
 
 fonts.handlers.otf.registerplugin('harf', process)





More information about the latex3-commits mailing list.