[latex3-commits] [git/LaTeX3-latex3-luaotfload] harfnode-dev: Don't break regular luatex (9fc46b8)
Marcel Fabian Krüger
tex at 2krueger.de
Tue Oct 15 20:59:12 CEST 2019
Repository : https://github.com/latex3/luaotfload
On branch : harfnode-dev
Link : https://github.com/latex3/luaotfload/commit/9fc46b8db7c15fc2633c798312e2091ddef3eeb8
>---------------------------------------------------------------
commit 9fc46b8db7c15fc2633c798312e2091ddef3eeb8
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Tue Oct 15 20:59:12 2019 +0200
Don't break regular luatex
>---------------------------------------------------------------
9fc46b8db7c15fc2633c798312e2091ddef3eeb8
src/luaotfload-auxiliary.lua | 2 +-
src/luaotfload-harf-define.lua | 2 +-
src/luaotfload-harf-plug.lua | 2 +-
src/luaotfload-main.lua | 6 ++++--
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua
index dca89f0..c3bbd14 100644
--- a/src/luaotfload-auxiliary.lua
+++ b/src/luaotfload-auxiliary.lua
@@ -39,7 +39,7 @@ local stringbyte = string.byte
local stringfind = string.find
local tablecopy = table.copy
-local harf = luaharfbuzz or require'luaharfbuzz'
+local harf = luaotfload.harfbuzz
local GSUBtag, GPOStag
if harf then
GSUBtag = harf.Tag.new("GSUB")
diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua
index ab7147b..3d4d98b 100644
--- a/src/luaotfload-harf-define.lua
+++ b/src/luaotfload-harf-define.lua
@@ -1,4 +1,4 @@
-local hb = luaharfbuzz or require'luaharfbuzz'
+local hb = luaotfload.harfbuzz
local hbfonts = {}
diff --git a/src/luaotfload-harf-plug.lua b/src/luaotfload-harf-plug.lua
index a91edff..461578d 100644
--- a/src/luaotfload-harf-plug.lua
+++ b/src/luaotfload-harf-plug.lua
@@ -1,4 +1,4 @@
-local hb = luaharfbuzz or require'luaharfbuzz'
+local hb = luaotfload.harfbuzz
local assert = assert
local next = next
diff --git a/src/luaotfload-main.lua b/src/luaotfload-main.lua
index 6ee3cd7..575c615 100644
--- a/src/luaotfload-main.lua
+++ b/src/luaotfload-main.lua
@@ -301,11 +301,13 @@ luaotfload.main = function ()
loadmodule "letterspace" --- extra character kerning
loadmodule "embolden" --- fake bold
loadmodule "notdef" --- missing glyph handling
- initialize "auxiliary" --- additional high-level functionality
- if pcall(require, 'luaharfbuzz') then
+ local harfstatus, harfbuzz = pcall(require, 'luaharfbuzz')
+ if harfstatus then
+ luaotfload.harfbuzz = harfbuzz
loadmodule "harf-define"
loadmodule "harf-plug"
end
+ initialize "auxiliary" --- additional high-level functionality
loadmodule "multiscript" --- ...
luaotfload.aux.start_rewrite_fontname () --- to be migrated to fontspec
More information about the latex3-commits
mailing list