summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-28 21:04:56 +0000
committerKarl Berry <karl@freefriends.org>2018-10-28 21:04:56 +0000
commitb66ea0d4e8536692eab3deb715a0b87a88a4b506 (patch)
tree2d6c32e517e191c6b9278cf1d260e998bc90efd9 /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua
parentcc272ef6384ce91e8195ee19a50bf3d81bf22176 (diff)
luaotfload (28oct18)
git-svn-id: svn://tug.org/texlive/trunk@49010 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-loaders.lua26
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)