[latex3-commits] [git/LaTeX3-latex3-luaotfload] multimode-dev: Simulate different pathname for harf fonts (5ccb992)
Marcel Fabian Krüger
tex at 2krueger.de
Fri Nov 1 15:05:17 CET 2019
Repository : https://github.com/latex3/luaotfload
On branch : multimode-dev
Link : https://github.com/latex3/luaotfload/commit/5ccb992f57890d1b9f44ad25e16f66227cf371d8
>---------------------------------------------------------------
commit 5ccb992f57890d1b9f44ad25e16f66227cf371d8
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Fri Nov 1 14:59:43 2019 +0100
Simulate different pathname for harf fonts
Fixes #107, breaks ttc fonts for harf mode in engines older than 1.11.2.
>---------------------------------------------------------------
5ccb992f57890d1b9f44ad25e16f66227cf371d8
src/luaotfload-harf-define.lua | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/luaotfload-harf-define.lua b/src/luaotfload-harf-define.lua
index 7ffa425..000827b 100644
--- a/src/luaotfload-harf-define.lua
+++ b/src/luaotfload-harf-define.lua
@@ -301,7 +301,7 @@ local function scalefont(data, spec)
local tfmdata = {
name = spec.specification,
- filename = spec.resolved,
+ filename = 'harfloaded:' .. spec.resolved,
subfont = spec.sub or 1,
designsize = size,
psname = sanitize(data.psname),
@@ -381,3 +381,11 @@ fonts.readers.harf = function(spec)
end
return scalefont(loadfont(spec), spec)
end
+
+luatexbase.add_to_callback('find_opentype_file', function(name)
+ return name:gsub('^harfloaded:', '')
+end, 'luaotfload.harf.strip_prefix')
+
+luatexbase.add_to_callback('find_truetype_file', function(name)
+ return name:gsub('^harfloaded:', '')
+end, 'luaotfload.harf.strip_prefix')
More information about the latex3-commits
mailing list