summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2017-02-07 07:47:28 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2017-02-07 07:47:28 +0100
commit8f001b0979b8b05079f4df00f174f40ed6badee1 (patch)
tree3be66a207933888e314d2b65f193c6c5fdf98a33
parent94649446c7d25187901b396845067dc7d8b7d61d (diff)
downloadluaotfload-8f001b0979b8b05079f4df00f174f40ed6badee1.tar.gz
[features] elucidate default “ligatures”
-rw-r--r--src/luaotfload-features.lua87
1 files changed, 60 insertions, 27 deletions
diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua
index a57aac3..8068f4f 100644
--- a/src/luaotfload-features.lua
+++ b/src/luaotfload-features.lua
@@ -1274,9 +1274,17 @@ local tlig_specification = {
type = "substitution",
features = everywhere,
data = {
- [0x0022] = 0x201D, -- quotedblright
- [0x0027] = 0x2019, -- quoteleft
- [0x0060] = 0x2018, -- quoteright
+ --- quotedblright:
+ --- " (QUOTATION MARK) → ” (RIGHT DOUBLE QUOTATION MARK)
+ [0x0022] = 0x201D,
+
+ --- quoteleft:
+ --- ' (APOSTROPHE) → ’ (RIGHT SINGLE QUOTATION MARK)
+ [0x0027] = 0x2019,
+
+ --- quoteright:
+ --- ` (GRAVE ACCENT) → ‘ (LEFT SINGLE QUOTATION MARK)
+ [0x0060] = 0x2018,
},
flags = noflags,
order = { "tlig" },
@@ -1286,30 +1294,55 @@ local tlig_specification = {
type = "ligature",
features = everywhere,
data = {
- [0x2013] = {0x002D, 0x002D}, -- endash
- [0x2014] = {0x002D, 0x002D, 0x002D}, -- emdash
- [0x201C] = {0x2018, 0x2018}, -- quotedblleft
- [0x201D] = {0x2019, 0x2019}, -- quotedblright
- [0x00A1] = {0x0021, 0x2018}, -- exclamdown
- [0x00BF] = {0x003F, 0x2018}, -- questiondown
- --- next three originate in T1 encoding; Xetex applies
- --- them too
- [0x201E] = {0x002C, 0x002C}, -- quotedblbase
- [0x00AB] = {0x003C, 0x003C}, -- LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
- [0x00BB] = {0x003E, 0x003E}, -- RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
- },
- flags = noflags,
- order = { "tlig" },
- prepend = true,
- },
- {
- type = "ligature",
- features = everywhere,
- data = {
- [0x201C] = {0x0060, 0x0060}, -- quotedblleft
- [0x201D] = {0x0027, 0x0027}, -- quotedblright
- [0x00A1] = {0x0021, 0x0060}, -- exclamdown
- [0x00BF] = {0x003F, 0x0060}, -- questiondown
+
+ --- endash:
+ --- [--] (HYPHEN-MINUS, HYPHEN-MINUS) → – (EN DASH)
+ [0x2013] = {0x002D, 0x002D},
+
+ --- emdash:
+ --- [---] (HYPHEN-MINUS, HYPHEN-MINUS, HYPHEN-MINUS) → — (EM DASH)
+ [0x2014] = {0x002D, 0x002D, 0x002D},
+
+ --- quotedblleft:
+ --- [''] (GRAVE ACCENT, GRAVE ACCENT) → “ (LEFT DOUBLE QUOTATION MARK)
+ [0x201C] = {0x0060, 0x0060},
+ --- quotedblleft:
+ --- [‘‘] (LEFT SINGLE QUOTATION MARK, LEFT SINGLE QUOTATION MARK) → “ (LEFT DOUBLE QUOTATION MARK)
+ [0x201C] = {0x2018, 0x2018},
+
+ --- quotedblright:
+ --- [``] (APOSTROPHE, APOSTROPHE) → ” (RIGHT DOUBLE QUOTATION MARK)
+ [0x201D] = {0x0027, 0x0027},
+ --- quotedblright:
+ --- [’’] (RIGHT SINGLE QUOTATION MARK, RIGHT SINGLE QUOTATION MARK) → ” (RIGHT DOUBLE QUOTATION MARK)
+ [0x201D] = {0x2019, 0x2019},
+
+ --- exclamdown:
+ --- [!'] (EXCLAMATION MARK, GRAVE ACCENT) → ¡ (INVERTED EXCLAMATION MARK)
+ [0x00A1] = {0x0021, 0x0060},
+ --- exclamdown:
+ --- [!‘] (EXCLAMATION MARK, LEFT SINGLE QUOTATION MARK) → ¡ (INVERTED EXCLAMATION MARK)
+ [0x00A1] = {0x0021, 0x2018},
+
+ --- questiondown:
+ --- [?'] (QUESTION MARK, GRAVE ACCENT) → ¡ (INVERTED EXCLAMATION MARK)
+ [0x00BF] = {0x003F, 0x0060},
+ --- questiondown:
+ --- [?'] (QUESTION MARK, LEFT SINGLE QUOTATION MARK) → ¡ (INVERTED EXCLAMATION MARK)
+ [0x00BF] = {0x003F, 0x2018},
+
+ --- next three originate in T1 encoding (Xetex applies them too)
+ --- quotedblbase:
+ --- [,,] (COMMA, COMMA) → ¡ (DOUBLE LOW-9 QUOTATION MARK)
+ [0x201E] = {0x002C, 0x002C},
+
+ --- LEFT-POINTING DOUBLE ANGLE QUOTATION MARK:
+ --- [,,] (LESS-THAN SIGN, LESS-THAN SIGN) → ¡ (LEFT-POINTING ANGLE QUOTATION MARK)
+ [0x00AB] = {0x003C, 0x003C},
+
+ --- RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK:
+ --- [,,] (GREATER-THAN SIGN, GREATER-THAN SIGN) → ¡ (RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK)
+ [0x00BB] = {0x003E, 0x003E},
},
flags = noflags,
order = { "tlig" },