summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2016-01-11 07:18:26 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2016-01-11 07:18:26 +0100
commit0da58d888b0a125c9c44aa99c957d88f96c59f1f (patch)
treeb97040bd462a3b59a74b9f3b6d42dbeb0c84f771
parent6c52a85e340761bb03b60564af0b0704d97e31a7 (diff)
downloadluaotfload-0da58d888b0a125c9c44aa99c957d88f96c59f1f.tar.gz
[features] import feature loading code
-rw-r--r--src/luaotfload-configuration.lua2
-rw-r--r--src/luaotfload-features.lua30
2 files changed, 19 insertions, 13 deletions
diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua
index 5e2800d..0d48479 100644
--- a/src/luaotfload-configuration.lua
+++ b/src/luaotfload-configuration.lua
@@ -89,7 +89,7 @@ local config_paths = {
}
local valid_formats = tabletohash {
- "otf", "ttc", "ttf", "dfont", "afm", "pfb", "pfa",
+ "otf", "ttc", "ttf", "dfont", "afm", "pfb", "pfa",
}
local feature_presets = {
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index 8a7000c..fd43e58 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -1147,20 +1147,26 @@ local utfchar = unicode.utf8.char
local otf = handlers and handlers.otf --- filled in later during initialization
local normalized = {
- substitution = "substitution",
- single = "substitution",
- ligature = "ligature",
- alternate = "alternate",
- multiple = "multiple",
- kern = "kern",
+ substitution = "substitution",
+ single = "substitution",
+ ligature = "ligature",
+ alternate = "alternate",
+ multiple = "multiple",
+ kern = "kern",
+ pair = "pair",
+ chainsubstitution = "chainsubstitution",
+ chainposition = "chainposition",
}
local types = {
- substitution = "gsub_single",
- ligature = "gsub_ligature",
- alternate = "gsub_alternate",
- multiple = "gsub_multiple",
- kern = "gpos_pair",
+ substitution = "gsub_single",
+ ligature = "gsub_ligature",
+ alternate = "gsub_alternate",
+ multiple = "gsub_multiple",
+ kern = "gpos_pair",
+ pair = "gpos_pair",
+ chainsubstitution = "gsub_contextchain",
+ chainposition = "gpos_contextchain",
}
setmetatableindex(types, function(t,k) t[k] = k return k end) -- "key"
@@ -1168,7 +1174,7 @@ setmetatableindex(types, function(t,k) t[k] = k return k end) -- "key"
--- stop locals for addfeature()
local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } }
-local noflags = { }
+local noflags = { false, false, false, false }
local tohash = table.tohash