diff options
author | Rasmus Andersson <rasmus@notion.se> | 2018-09-28 22:45:43 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2018-10-11 09:38:23 +0300 |
commit | 42f8afe6568c3b0d2cbcb7e412b3c32dd8f80729 (patch) | |
tree | ea4c0932b5b23edcfea68052296c795125c842c2 /src/Inter-UI-Regular.ufo/features.fea | |
parent | 746d527b8f4bd6b5bc721c51052af98d11fc27c0 (diff) | |
download | inter-42f8afe6568c3b0d2cbcb7e412b3c32dd8f80729.tar.xz |
left-right arrow adjustments and calt refinements for case on left-hand repetition
Diffstat (limited to 'src/Inter-UI-Regular.ufo/features.fea')
-rw-r--r-- | src/Inter-UI-Regular.ufo/features.fea | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/src/Inter-UI-Regular.ufo/features.fea b/src/Inter-UI-Regular.ufo/features.fea index 8595a68d9..34c84e1c5 100644 --- a/src/Inter-UI-Regular.ufo/features.fea +++ b/src/Inter-UI-Regular.ufo/features.fea @@ -1024,7 +1024,6 @@ sub leftLongArrow by leftLongArrow.case; sub rightArrow by rightArrow.case; sub rightLongArrow by rightLongArrow.case; sub leftRightArrow by leftRightArrow.case; -sub upDownArrow by upDownArrow.case; sub leftRightLongArrow by leftRightLongArrow.case; } case; @@ -1057,7 +1056,6 @@ feature calt { rightLongArrow leftRightArrow leftRightLongArrow - upDownArrow notequal colon ]; @@ -1093,7 +1091,6 @@ feature calt { rightLongArrow.case leftRightArrow.case leftRightLongArrow.case - upDownArrow.case notequal.case colon.case ]; @@ -1105,23 +1102,19 @@ feature calt { @UC = [ @UC_ROMAN @UC_SET1 exclam question ]; @LC = [ @LC_ROMAN @LC_SET1 ]; -sub [ @UC @CASE_R ] @CASE_L' by @CASE_R; # Z y' -> Z x -> Z x 'y -> Z x x ... -ignore sub @LC @CASE_NONDELIM_L @UC; # e.g. m multiply M -sub @CASE_L' [ @UC @CASE_R ] by @CASE_R; # y' Z -> x Z - -# rule to support left-hand repetition of CASE{L}->{R} [issue #57] -# e.g. /at /at /UC -> /at.case /at /UC -> /at.case /at.case /UC -# Note that we can't look further than 2 glyphs back, since it would break -# cases like /a /braceleft /braceright /asterisk /asterisk /A -sub @CASE_L' @CASE_L [ @CASE_R @UC ] by @CASE_R; +# --------------------------------------------------- # ignore <-NUM e.g. "<-3" ignore sub less [ hyphen hyphen.case endash endash.case emdash emdash.case ] @NUM; + # arrows: <-> sub less hyphen greater by leftRightArrow; sub less hyphen.case greater by leftRightArrow.case; sub less [endash emdash] greater by leftRightLongArrow; sub less [endash.case emdash.case] greater by leftRightLongArrow.case; +sub less hyphen hyphen greater by leftRightLongArrow; +sub less hyphen.case hyphen.case greater by leftRightLongArrow.case; + # arrows: -> sub hyphen greater by rightArrow; sub hyphen.case greater by rightArrow.case; @@ -1133,6 +1126,30 @@ sub less hyphen.case by leftArrow.case; sub less [endash emdash] by leftLongArrow; sub less [endash.case emdash.case] by leftLongArrow.case; +# :-) +sub colon' [hyphen hyphen.case endash endash.case emdash emdash.case] [parenright parenright.case] by colon.case; +sub [colon colon.case] hyphen' [parenright parenright.case] by hyphen.case; +sub [colon colon.case] endash' [parenright parenright.case] by endash.case; +sub [colon colon.case] emdash' [parenright parenright.case] by emdash.case; +sub [colon colon.case] [hyphen hyphen.case endash endash.case emdash emdash.case] parenright' by parenright.case; + +# A foo' -> A foo.case +sub [ @UC @CASE_R ] @CASE_L' by @CASE_R; +ignore sub @LC @CASE_NONDELIM_L @UC; # e.g. m multiply M + +# foo' foo foo foo foo A -> foo.case foo foo foo foo A +# foo' foo foo foo A -> foo.case foo foo foo A +# foo' foo foo A -> foo.case foo foo A +# foo' foo A -> foo.case foo A +# foo' A -> foo.case A +# Note: since we look quite far back, sequences like x{}[]M will case both +# the square brackets next to M _and_ the curly braces to become .case +sub @CASE_L' @CASE_L @CASE_L @CASE_L @CASE_L [ @CASE_R @UC ] by @CASE_R; +sub @CASE_L' @CASE_L @CASE_L @CASE_L [ @CASE_R @UC ] by @CASE_R; +sub @CASE_L' @CASE_L @CASE_L [ @CASE_R @UC ] by @CASE_R; +sub @CASE_L' @CASE_L [ @CASE_R @UC ] by @CASE_R; +sub @CASE_L' [ @UC @CASE_R ] by @CASE_R; + } calt; feature tnum { |