From bc4588e5d5c4392cb1491c57d8c0f12e2221e215 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Fri, 18 Dec 2015 08:07:08 +0100 Subject: [features] clean up font feature handling --- src/luaotfload-features.lua | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/luaotfload-features.lua') diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua index 5188051..749ffec 100644 --- a/src/luaotfload-features.lua +++ b/src/luaotfload-features.lua @@ -938,14 +938,6 @@ local report_otf = logs.reporter("fonts","otf loading") --HH]]-- -local types = { - substitution = "gsub_single", - ligature = "gsub_ligature", - alternate = "gsub_alternate", -} - -setmetatableindex(types, function(t,k) t[k] = k return k end) -- "key" - --- start locals for addfeature() local utfbyte = unicode.utf8.byte @@ -969,6 +961,8 @@ local types = { kern = "gpos_pair", } +setmetatableindex(types, function(t,k) t[k] = k return k end) -- "key" + --- stop locals for addfeature() local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } } @@ -1220,6 +1214,8 @@ end ---[[ end snippet from font-otc.lua ]] +local tlig_order = { "tlig" } + local tlig_specification = { { type = "substitution", @@ -1230,7 +1226,7 @@ local tlig_specification = { [0x0060] = 0x2018, -- quoteright }, flags = noflags, - order = { "tlig" }, + order = tlig_order, prepend = true, }, { @@ -1250,7 +1246,7 @@ local tlig_specification = { [0x00BB] = {0x003E, 0x003E}, -- RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK }, flags = noflags, - order = { "tlig" }, + order = tlig_order, prepend = true, }, { @@ -1263,7 +1259,7 @@ local tlig_specification = { [0x00BF] = {0x003F, 0x0060}, -- questiondown }, flags = noflags, - order = { "tlig" }, + order = tlig_order, prepend = true, }, } -- cgit v1.2.3