summaryrefslogtreecommitdiff
path: root/src/luaotfload-features.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-02-18 08:35:22 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2016-02-18 08:35:30 +0100
commit1a6a253e85e609d37113585081b6cf9711757208 (patch)
tree836c3da8cdb9c2ce84c3f3950e06e629810225d9 /src/luaotfload-features.lua
parentde3abd3209745257c1fbb7bf08be6b189d5e3cdd (diff)
downloadluaotfload-1a6a253e85e609d37113585081b6cf9711757208.tar.gz
[features,loaders] allow for direct injection of tfmdata when defining fonts
Diffstat (limited to 'src/luaotfload-features.lua')
-rw-r--r--src/luaotfload-features.lua17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 723fd54..0ca58c1 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -74,7 +74,6 @@ local handle_combination = function (combo, spec)
report ("both", 0, "load", "Empty font combination requested.")
return false
end
- inspect(combo)
if not fontidentifiers then
fontidentifiers = fonts.hashes and fonts.hashes.identifiers
@@ -150,9 +149,16 @@ local handle_combination = function (combo, spec)
for j = 1, #def do
local this = def [j]
if type (this) == "number" then
+ report ("both", 0, "load",
+ " *> [%d][%d]: import codepoint U+%.4X",
+ i, j, this)
pickchr (this)
elseif type (this) == "table" then
- for uc = this [1], this [2] do pickchr (uc) end
+ local lo, hi = unpack (this)
+ report ("both", 0, "load",
+ " *> [%d][%d]: import codepoint range U+%.4X--U+%.4X",
+ i, j, lo, hi)
+ for uc = lo, hi do pickchr (uc) end
else
report ("both", 0, "load",
" *> item no. %d of combination definition \z
@@ -163,7 +169,12 @@ local handle_combination = function (combo, spec)
" *> font %d / %d: imported %d glyphs into combo.",
i, nc, cnt)
end
- return basefnt
+ spec.lookup = nil
+ spec.method = nil
+ spec.name = spec.specification
+ spec.forced = nil
+ spec.data = function () return basefnt end
+ return spec
end
---[[ begin excerpt from font-ott.lua ]]