diff options
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua index 802776c5be8..f61ee480474 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua @@ -1,4 +1,3 @@ -#!/usr/bin/env texlua ----------------------------------------------------------------------- -- FILE: luaotfload-loaders.lua -- DESCRIPTION: Luaotfload callback handling @@ -6,8 +5,21 @@ -- AUTHOR: Philipp Gesang <phg@phi-gamma.net> -- AUTHOR: Hans Hagen, Khaled Hosny, Elie Roux, David Carlisle ----------------------------------------------------------------------- --- ---- Contains parts of the earlier main script. + +local ProvidesLuaModule = { + name = "luaotfload-loaders", + version = "2.93", --TAGVERSION + date = "2018-10-28", --TAGDATE + description = "luaotfload submodule / callback handling", + license = "GPL v2.0" +} + +if luatexbase and luatexbase.provides_module then + luatexbase.provides_module (ProvidesLuaModule) +end +----------------------------------------------------------------------- + + if not lualibs then error "this module requires Luaotfload" end if not luaotfload then error "this module requires Luaotfload" end @@ -122,10 +134,10 @@ do local patch = function (specification, size, id) local fontdata = read (specification, size, id) ----if not fontdata then not_found_msg (specification, size, id) end - if type (fontdata) == "table" and fontdata.shared then - --- We need to test for the “shared” field here - --- or else the fontspec capheight callback will - --- operate on tfm fonts. + if type (fontdata) == "table" and fontdata.encodingbytes == 2 then + --- We need to test for `encodingbytes` to avoid passing + --- tfm fonts to `patch_font`. These fonts are fragile + --- because they use traditional TeX font handling. luatexbase.call_callback ("luaotfload.patch_font", fontdata, specification) else luatexbase.call_callback ("luaotfload.patch_font_unsafe", fontdata, specification) |