diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2016-09-27 23:26:11 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2016-09-27 23:38:43 +0200 |
commit | 7ca84d412dde2a7a67cca513ba668687e3e34260 (patch) | |
tree | d5e986a0f42ab12cfc78b381b80e08d772511144 /src | |
parent | 9bac31c4ff154a7af6156156891754d0c44dd383 (diff) | |
download | luaotfload-7ca84d412dde2a7a67cca513ba668687e3e34260.tar.gz |
[features,parsers] add extremely important feature
Credits to Taco for the talk at Kalenberg that inspired the feature.
Extending the parser is required so we can have proper name for the
feature.
Happy Luatex 1.0.0
Diffstat (limited to 'src')
-rw-r--r-- | src/luaotfload-features.lua | 6 | ||||
-rw-r--r-- | src/luaotfload-parsers.lua | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua index f56213d..285482f 100644 --- a/src/luaotfload-features.lua +++ b/src/luaotfload-features.lua @@ -1340,11 +1340,17 @@ local rot13_specification = { prepend = true, } +local interrolig_specification = { + { type = "ligature", data = { [0x203d] = {0x21, 0x3f}, [0x2e18] = {0xa1, 0xbf}, }, }, + { type = "ligature", data = { [0x203d] = {0x3f, 0x21}, [0x2e18] = {0xbf, 0xa1}, }, }, +} + local autofeatures = { --- always present with Luaotfload; anum for Arabic and Persian is --- predefined in font-otc. { "tlig" , tlig_specification , "tex ligatures and substitutions" }, { "rot13", rot13_specification, "rot13" }, + { "!!??", interrolig_specification, "interrobang substitutions" }, } local add_auto_features = function () diff --git a/src/luaotfload-parsers.lua b/src/luaotfload-parsers.lua index 307c35c..e056460 100644 --- a/src/luaotfload-parsers.lua +++ b/src/luaotfload-parsers.lua @@ -623,7 +623,7 @@ local unprefixed = Cg(fontname, "anon") local path_lookup = lbrk * Cg(C((1-rbrk)^1), "path") * rbrk --- features ---------------------------------------------------------- -local field_char = anum + S"+-." --- sic! +local field_char = anum + S"+-.!?" --- sic! local field = field_char^1 --- assignments are “lhs=rhs” --- or “+lhs=rhs” (Xetex-style) |