public
Created

The character sequence "roe it" (two Quikscript letters) gets turned into "roe.s2 it.2s".

  • Download Gist
ame.fea
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
 
# Glyph names and lookup names must be:
# - up to 31 characters
# - be comprised of A-Z a-z 0-9 . _
# - must not start with a digit or period (underscores OK)
 
# glyph names and lookup names can be 31 characters;
# glyph class names (lists) max out at 30.
 
##############################################################
## Glyph Classes
##
 
## Connects at Short
@can_2s = [ may-qs no-qs it-qs utter-qs ];
@can_s2 = [ no-qs it-qs et-qs roe-qs awe-qs ];
 
@does_2s = [ may-qs.2s no-qs.2s it-qs.2s utter-qs.2s ];
@does_s2 = [ no-qs.s2 it-qs.s2 et-qs.s2 roe-qs.s2 awe-qs.s2 ];
 
@can_s2s = [ no-qs ];
@does_s2s = [ no-qs.s2s ];
 
 
## Connects at baseline
@can_2b = [ tea-qs no-qs it-qs eat-qs et-qs awe-qs ];
@can_b2 = [ tea-qs no-qs it-qs eat-qs utter-qs roe-qs ];
 
@does_2b = [ tea-qs.2b no-qs.2b it-qs.2b eat-qs.2b et-qs.2b awe-qs.2b ];
@does_b2 = [ tea-qs.b2 no-qs.b2 it-qs.b2 eat-qs.b2 utter-qs.b2 roe-qs.b2 ];
 
@can_b2b = [ no-qs eat-qs ];
@does_b2b = [ no-qs.b2b eat-qs.b2b ];
 
 
## Diagonal Connections
@can_s2b = [ it-qs awe-qs ];
@can_b2s = [ it-qs utter-qs ];
 
##############################################################
## Single-Glyph Substitutions
##
 
lookup plain_to_2s {
sub may-qs by may-qs.2s;
sub no-qs by no-qs.2s;
sub it-qs by it-qs.2s;
sub utter-qs by utter-qs.2s;
} plain_to_2s;
 
lookup plain_to_s2 {
sub no-qs by no-qs.s2;
sub it-qs by it-qs.s2;
sub et-qs by et-qs.s2;
sub roe-qs by roe-qs.s2;
sub awe-qs by awe-qs.s2;
} plain_to_s2;
 
lookup s2_to_s2s {
sub no-qs.s2 by no-qs.s2s;
} s2_to_s2s;
 
lookup _2s_to_s2s {
sub no-qs.2s by no-qs.s2s;
} _2s_to_s2s;
 
 
## at baseline
 
lookup plain_to_2b {
sub tea-qs by tea-qs.2b;
sub no-qs by no-qs.2b;
sub it-qs by it-qs.2b;
sub eat-qs by eat-qs.2b;
sub et-qs by et-qs.2b;
sub awe-qs by awe-qs.2b;
} plain_to_2b;
 
lookup plain_to_b2 {
sub tea-qs by tea-qs.b2;
sub no-qs by no-qs.b2;
sub it-qs by it-qs.b2;
sub eat-qs by eat-qs.b2;
sub utter-qs by utter-qs.b2;
sub roe-qs by roe-qs.b2;
} plain_to_b2;
 
lookup b2_to_b2b {
sub no-qs.b2 by no-qs.b2b;
sub eat-qs.b2 by eat-qs.b2b;
} b2_to_b2b;
 
lookup _2b_to_b2b {
sub no-qs.2b by no-qs.b2b;
sub eat-qs.2b by eat-qs.b2b;
} _2b_to_b2b;
 
 
## crossovers
 
lookup b2_to_b2s {
sub it-qs.b2 by it-qs.b2s;
sub utter-qs.b2 by utter-qs.b2s;
} b2_to_b2s;
 
lookup s2_to_s2b {
sub it-qs.s2 by it-qs.s2b;
sub awe-qs.s2 by awe-qs.s2b;
} s2_to_s2b;
 
lookup _2b_to_s2b {
sub it-qs.2b by it-qs.s2b;
sub awe-qs.2b by awe-qs.s2b;
} _2b_to_s2b;
 
lookup _2s_to_b2s {
sub it-qs.2s by it-qs.b2s;
sub utter-qs.2s by utter-qs.b2s;
} _2s_to_b2s;
 
 
##############################################################
## 'calt' Passes
##
 
# Possibly useful lookupflags: IgnoreBaseGlyphs, IgnoreLigatures (defined in GDEF table)
 
### Connects the unconnected.
lookup calt_pass_1 {
sub @can_2b' lookup plain_to_2b
@can_b2' lookup plain_to_b2;
sub @can_2s' lookup plain_to_2s
@can_s2' lookup plain_to_s2;
 
sub @can_s2' lookup plain_to_s2
@can_2s' lookup plain_to_2s;
 
 
 
sub @can_b2' lookup plain_to_b2
@can_2b' lookup plain_to_2b;
} calt_pass_1;
 
 
 
### Connects what's connected on one side already.
lookup calt_pass_2 {
sub @does_b2' lookup b2_to_b2b # 5
@can_2b' lookup plain_to_2b;
sub @does_b2' lookup b2_to_b2s # 6
@can_s2' lookup plain_to_s2;
 
sub @does_s2' lookup s2_to_s2b # 8
@can_b2' lookup plain_to_b2;
sub @does_s2' lookup s2_to_s2s # 9
@can_s2' lookup plain_to_s2;
sub @does_b2' lookup b2_to_b2b # 5
@does_2b' lookup _2b_to_b2b;
sub @does_b2' lookup b2_to_b2s # 6
@does_2b' lookup _2b_to_s2b;
sub @does_s2' lookup s2_to_s2b # 8
@does_2b' lookup _2b_to_b2b;
sub @does_s2' lookup s2_to_s2s # 9
@does_2b' lookup _2b_to_s2b;
 
sub @does_b2' lookup b2_to_b2s # 5
@does_2s' lookup _2s_to_b2s;
sub @does_b2' lookup b2_to_b2s # 6
@does_2s' lookup _2s_to_s2s;
sub @does_s2' lookup s2_to_s2b # 8
@does_2s' lookup _2s_to_b2s;
sub @does_s2' lookup s2_to_s2s # 9 (responsible for nnnnnnn failures?)
@does_2s' lookup _2s_to_s2s;
} calt_pass_2;
 
 
##############################################################
## Features
##
 
feature calt {
lookup calt_pass_1;
# lookup calt_pass_2;
} calt;

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.