[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Add callback for variable fonts (14cbf4c)

Marcel Fabian Krüger tex at 2krueger.de
Wed Aug 26 03:47:21 CEST 2020


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

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

commit 14cbf4cfdcd8d48b41b5e84d0a7512f2b04595ed
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Wed Aug 26 03:47:21 2020 +0200

    Add callback for variable fonts


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

14cbf4cfdcd8d48b41b5e84d0a7512f2b04595ed
 src/luaotfload-init.lua | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/luaotfload-init.lua b/src/luaotfload-init.lua
index 3d63363..202fffc 100644
--- a/src/luaotfload-init.lua
+++ b/src/luaotfload-init.lua
@@ -444,6 +444,14 @@ local init_post_install_callbacks = function ()
                              "luaotfload.node_processor",
                              1)
   -- /MK
+
+  local streams = fonts.hashes.streams
+  luatexbase.add_to_callback("glyph_stream_provider",function(id,index,mode)
+    if id <= 0 then return "" end
+    local stream = streams[id].streams
+    if not stream then return "" end
+    return stream[index] or ""
+  end, "luaotfload.glyph_stream")
 end
 
 local function init_post_load_agl ()





More information about the latex3-commits mailing list.