From 16dc363f7718f96063d15f77eecf3db8a19789cc Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 2 May 2020 21:00:47 +0000 Subject: luaotfload (2may20) git-svn-id: svn://tug.org/texlive/trunk@54971 c570f23f-e606-0410-a88d-b1316a301751 --- .../luatex/luaotfload/luaotfload-letterspace.lua | 32 ++++++++-------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua') diff --git a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua index ce7d6fcd565..2825b87ea72 100644 --- a/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua +++ b/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua @@ -5,8 +5,8 @@ local ProvidesLuaModule = { name = "luaotfload-letterspace", - version = "3.12", --TAGVERSION - date = "2020-02-02", --TAGDATE + version = "3.13", --TAGVERSION + date = "2020-05-01", --TAGDATE description = "luaotfload submodule / color", license = "GPL v2.0", copyright = "PRAGMA ADE / ConTeXt Development Team", @@ -165,7 +165,7 @@ end ---=================================================================--- -- UF changed 2017-07-14 -local kern_injector = function (fillup, kern) +local function kern_injector (fillup, kern) if fillup then local g = new_node(glue_code) setglue(g, 0, kern, 0, 1, 0) @@ -177,7 +177,7 @@ local kern_injector = function (fillup, kern) end -- /UF -local kernable_skip = function (n) +local function kernable_skip (n) local st = getsubtype (n) return st == userskip_code or st == spaceskip_code @@ -452,7 +452,7 @@ end --- (node_t -> node_t) -> string -> string list -> bool local registered_as = { } --- procname -> callbacks -local add_processor = function (processor, name, ...) +local function add_processor (processor, name, ...) local callbacks = { ... } for i=1, #callbacks do luatexbase.add_to_callback(callbacks[i], processor, name) @@ -461,18 +461,6 @@ local add_processor = function (processor, name, ...) return true end ---- string -> bool -local remove_processor = function (name) - local callbacks = registered_as[name] - if callbacks then - for i=1, #callbacks do - luatexbase.remove_from_callback(callbacks[i], name) - end - return true - end - return false --> unregistered -end - --- When font kerning is requested, usually by defining a font with the --- ``letterspace`` parameter, we inject a wrapper for the --- ``kerncharacters()`` node processor in the relevant callbacks. This @@ -482,9 +470,9 @@ end --- performs all node operations on direct nodes. --- unit -> bool -local enablefontkerning = function ( ) +local function enablefontkerning ( ) - local handler = function (hd) + local function handler (hd) local direct_hd = todirect (hd) logreport ("term", 5, "letterspace", "kerncharacters() invoked with node.direct interface \z @@ -523,7 +511,7 @@ end local fontkerning_enabled = false --- callback state --- fontobj -> float -> unit -local initializefontkerning = function (tfmdata, factor) +local function initializefontkerning (tfmdata, factor) if factor ~= "max" then factor = tonumber (factor) or 0 end @@ -548,6 +536,7 @@ otffeatures.register { initializers = { base = initializefontkerning, node = initializefontkerning, + plug = initializefontkerning, } } @@ -562,7 +551,7 @@ otffeatures.register { --doc]]-- -local initializecompatfontkerning = function (tfmdata, percentage) +local function initializecompatfontkerning (tfmdata, percentage) local factor = tonumber (percentage) if not factor then logreport ("both", 0, "letterspace", @@ -580,6 +569,7 @@ otffeatures.register { initializers = { base = initializecompatfontkerning, node = initializecompatfontkerning, + plug = initializecompatfontkerning, } } -- cgit v1.2.3