summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-05-02 21:00:47 +0000
committerKarl Berry <karl@freefriends.org>2020-05-02 21:00:47 +0000
commit16dc363f7718f96063d15f77eecf3db8a19789cc (patch)
tree4c6c7df92086e8d28dceddad5011d5abddf185db /Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua
parent83bce5369c17e79e461fc45c3707d11990d9c9a7 (diff)
luaotfload (2may20)
git-svn-id: svn://tug.org/texlive/trunk@54971 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luaotfload/luaotfload-letterspace.lua32
1 files changed, 11 insertions, 21 deletions
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,
}
}