add ligations for <*> =>= etc.
This commit is contained in:
parent
2fba9aee2f
commit
87745c5f15
|
@ -389,7 +389,7 @@ export : define [apply] : begin
|
||||||
curl (right - HALFSTROKE + TANSLANT * sw) (bot + O)
|
curl (right - HALFSTROKE + TANSLANT * sw) (bot + O)
|
||||||
save 'at.fourfold'
|
save 'at.fourfold'
|
||||||
|
|
||||||
sketch # at.petite
|
sketch # at.short
|
||||||
set-width WIDTH
|
set-width WIDTH
|
||||||
|
|
||||||
local top operTop
|
local top operTop
|
||||||
|
@ -402,6 +402,7 @@ export : define [apply] : begin
|
||||||
|
|
||||||
local sma : SMOOTHA * ((m1 - SB) / (RIGHTSB - SB) * 1.1)
|
local sma : SMOOTHA * ((m1 - SB) / (RIGHTSB - SB) * 1.1)
|
||||||
local smb : SMOOTHB * ((m1 - SB) / (RIGHTSB - SB) * 1.1)
|
local smb : SMOOTHB * ((m1 - SB) / (RIGHTSB - SB) * 1.1)
|
||||||
|
local atTurnBot (obot - sma / 2)
|
||||||
|
|
||||||
local shrink 0.6
|
local shrink 0.6
|
||||||
|
|
||||||
|
@ -419,17 +420,17 @@ export : define [apply] : begin
|
||||||
|
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.lhs sw
|
widths.lhs sw
|
||||||
corner m1 (obot + sma) [heading UPWARD]
|
corner m1 (atTurnBot + sma) [heading UPWARD]
|
||||||
corner m1 (otop - smb) [heading UPWARD]
|
corner m1 (otop - smb) [heading UPWARD]
|
||||||
corner m1 otop [widths.heading (sw * shrink) 0 UPWARD]
|
corner m1 otop [widths.heading (sw * shrink) 0 UPWARD]
|
||||||
|
|
||||||
include : dispiro
|
include : dispiro
|
||||||
widths.lhs (sw * shrink)
|
widths.lhs (sw * shrink)
|
||||||
straight.down.start (m1 - sw * shrink * HVCONTRAST) (obot + sma) [heading DOWNWARD]
|
straight.down.start (m1 - sw * shrink * HVCONTRAST) (atTurnBot + sma) [heading DOWNWARD]
|
||||||
arcvh
|
arcvh
|
||||||
g4 ([mix (m1 - sw * HVCONTRAST) RIGHTSB 0.5] + CORRECTION_OMIDX * sw) (obot + O) [widths.lhs sw]
|
g4 ([mix (m1 - sw * HVCONTRAST) RIGHTSB 0.5] + CORRECTION_OMIDX * sw) (atTurnBot + O) [widths.lhs sw]
|
||||||
archv
|
archv
|
||||||
flat RIGHTSB (obot + sma)
|
flat RIGHTSB (atTurnBot + sma)
|
||||||
curl RIGHTSB (top - SMOOTHB)
|
curl RIGHTSB (top - SMOOTHB)
|
||||||
hookend (top - O)
|
hookend (top - O)
|
||||||
g4 SB (top - HOOK)
|
g4 SB (top - HOOK)
|
||||||
|
|
|
@ -163,35 +163,50 @@ export : define [apply para glyphList] : begin
|
||||||
dasiaoxia {'revCommaAbove' 'acuteAbove'}
|
dasiaoxia {'revCommaAbove' 'acuteAbove'}
|
||||||
dasiaperispomeni {'revCommaAbove' 'perispomeniAbove'}
|
dasiaperispomeni {'revCommaAbove' 'perispomeniAbove'}
|
||||||
|
|
||||||
|
local lookupOrder {}
|
||||||
|
|
||||||
# calt and other ligations
|
# calt and other ligations
|
||||||
if (para.spacing > 0) : let : begin
|
if (para.spacing > 0) : do
|
||||||
local stick {'hyphen' 'equal'}
|
local stick {'hyphen' 'equal'}
|
||||||
local less {'less'}
|
local less {'less'}
|
||||||
local hyphen {'hyphen'}
|
local hyphen {'hyphen'}
|
||||||
local exclam {'exclam'}
|
local exclam {'exclam'}
|
||||||
local greater {'greater'}
|
local greater {'greater'}
|
||||||
|
|
||||||
define [lsx s] : lambda [t] : t.map : lambda [x] "lig\(x).\(s)"
|
define [lsx s] : lambda [t] : t.map : lambda [x] "lig\(x).\(s)"
|
||||||
|
|
||||||
local progLigNameMap
|
local progLigNameMap
|
||||||
.XHS_ 'hask'
|
.XHS_ 'hask'
|
||||||
.XPTL 'hask'
|
.XPTL 'hask'
|
||||||
foreach
|
foreach
|
||||||
: ligationFeatureName : items-of : {'calt'}.concat [Object.keys progLigNameMap]
|
: ligationFeatureName : items-of : {'calt'}.concat [Object.keys progLigNameMap]
|
||||||
: begin
|
: do
|
||||||
local mappedFeature : progLigNameMap.(ligationFeatureName) || ligationFeatureName
|
local mappedFeature : progLigNameMap.(ligationFeatureName) || ligationFeatureName
|
||||||
local ligationLookupName : 'lig_' + mappedFeature
|
local ligationLookupName : 'lig_' + ligationFeatureName + '-' + mappedFeature
|
||||||
local [only subtable lns] : begin
|
local [only subtable lns] : begin
|
||||||
if ([lns.indexOf mappedFeature] >= 0) [then : return subtable] : else : begin
|
if ([lns.indexOf mappedFeature] >= 0)
|
||||||
|
: then : return subtable
|
||||||
|
: else : begin
|
||||||
set subtable.apply {}
|
set subtable.apply {}
|
||||||
return subtable
|
return subtable
|
||||||
|
|
||||||
commonList.push ligationFeatureName
|
commonList.push ligationFeatureName
|
||||||
set features.(ligationFeatureName) {ligationLookupName}
|
local featLookups {}
|
||||||
if [not lookups.(ligationLookupName)] : set lookups.(ligationLookupName)
|
local [includeLookup obj] : begin
|
||||||
|
local ln : ligationLookupName + featLookups.length
|
||||||
|
set lookups.(ln) obj
|
||||||
|
featLookups.push ln
|
||||||
|
lookupOrder.push ln
|
||||||
|
set features.(ligationFeatureName) featLookups
|
||||||
|
|
||||||
|
includeLookup
|
||||||
.type 'gsub_chaining'
|
.type 'gsub_chaining'
|
||||||
.subtables : list
|
.subtables : list
|
||||||
chain-rule less (stick ~> [lsx 'lc'] ) (stick ~> [lsx 'cc'] ) (stick ~> [lsx 'cc'] ) (stick ~> [lsx 'cr']) greater # <----> <=-==>
|
chain-rule {'less' 'hyphen' 'equal'} ({'asterisk'} ~> {'asterisk.low'}) # <*
|
||||||
|
chain-rule ({'asterisk'} ~> {'asterisk.low'}) {'greater' 'hyphen' 'equal'} # *>
|
||||||
|
|
||||||
|
includeLookup
|
||||||
|
.type 'gsub_chaining'
|
||||||
|
.subtables : list
|
||||||
|
chain-rule less (stick ~> [lsx 'lc'] ) (stick ~> [lsx 'cc'] ) (stick ~> [lsx 'cc'] ) (stick ~> [lsx 'cr']) greater # <----> <====>
|
||||||
chain-rule less (stick ~> [lsx 'lc'] ) (stick ~> [lsx 'cc'] ) (stick ~> [lsx 'cr']) greater # <---> <===>
|
chain-rule less (stick ~> [lsx 'lc'] ) (stick ~> [lsx 'cc'] ) (stick ~> [lsx 'cr']) greater # <---> <===>
|
||||||
chain-rule less (stick ~> [lsx 'lc'] ) (stick ~> [lsx 'cr']) greater # <--> <==>
|
chain-rule less (stick ~> [lsx 'lc'] ) (stick ~> [lsx 'cr']) greater # <--> <==>
|
||||||
chain-rule less (stick ~> [lsx 'lr']) greater # <->, <=>
|
chain-rule less (stick ~> [lsx 'lr']) greater # <->, <=>
|
||||||
|
@ -210,18 +225,26 @@ export : define [apply para glyphList] : begin
|
||||||
:> only {'hask'}
|
:> only {'hask'}
|
||||||
chain-rule (stick ~> [lsx 'fc']) (stick ~> [lsx 'cc']) (stick ~> [lsx 'cr']) greater # --->, ===>
|
chain-rule (stick ~> [lsx 'fc']) (stick ~> [lsx 'cc']) (stick ~> [lsx 'cr']) greater # --->, ===>
|
||||||
chain-rule (stick ~> [lsx 'fc']) (stick ~> [lsx 'cr']) greater # -->, ==>
|
chain-rule (stick ~> [lsx 'fc']) (stick ~> [lsx 'cr']) greater # -->, ==>
|
||||||
|
chain-rule (stick ~> [lsx 'fr']) greater (stick ~> [lsx 'jf']) # ->- =>=
|
||||||
|
:> only {'hask'}
|
||||||
chain-rule (stick ~> [lsx 'fr1']) (greater ~> [lsx 'shift1']) greater # ->>, =>>
|
chain-rule (stick ~> [lsx 'fr1']) (greater ~> [lsx 'shift1']) greater # ->>, =>>
|
||||||
:> only {'hask'}
|
:> only {'hask'}
|
||||||
chain-rule (stick ~> [lsx 'fr']) greater # ->, =>
|
chain-rule (stick ~> [lsx 'fr']) greater # ->, =>
|
||||||
|
chain-rule (stick ~> [lsx 'fj']) less (stick ~> [lsx 'lf']) # -<- =<=
|
||||||
|
:> only {'hask'}
|
||||||
chain-rule (stick ~> [lsx 'fj1']) (less ~> [lsx 'shiftN1']) less # -<<, =<<
|
chain-rule (stick ~> [lsx 'fj1']) (less ~> [lsx 'shiftN1']) less # -<<, =<<
|
||||||
:> only {'hask'}
|
:> only {'hask'}
|
||||||
chain-rule (stick ~> [lsx 'fj']) less # -<, =<
|
chain-rule (stick ~> [lsx 'fj']) less # -<, =<
|
||||||
:> only {'hask'}
|
:> only {'hask'}
|
||||||
|
|
||||||
chain-rule ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # :> :- := :< :+
|
chain-rule ({'colon'} ~> {'colon.mid'}) ({'asterisk'} ~> {'asterisk.low'}) # :*
|
||||||
chain-rule ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # ::> ::- ::= ::< ::+
|
chain-rule ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) ({'asterisk'} ~> {'asterisk.low'}) # ::*
|
||||||
|
chain-rule ({'asterisk'} ~> {'asterisk.low'}) ({'colon'} ~> {'colon.mid'}) # *:
|
||||||
chain-rule ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # :::> :::- :::= :::< :::+
|
chain-rule ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # :::> :::- :::= :::< :::+
|
||||||
|
chain-rule ({'colon'} ~> {'colon.mid'}) ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # ::> ::- ::= ::< ::+
|
||||||
|
chain-rule ({'colon'} ~> {'colon.mid'}) {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} # :> :- := :< :+
|
||||||
chain-rule {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} ({'colon'} ~> {'colon.mid'}) # <: >: -: =: +:
|
chain-rule {'greater' 'less' 'hyphen' 'equal' 'plus' 'colon.mid'} ({'colon'} ~> {'colon.mid'}) # <: >: -: =: +:
|
||||||
|
chain-rule {'colon.mid'} ({'colon'} ~> {'colon.mid'}) # ::
|
||||||
|
|
||||||
# Colon chains
|
# Colon chains
|
||||||
chain-rule {'colon.dright' 'colon.dmid'} ({'colon'} ~> {'colon.dmid'}) {'colon'}
|
chain-rule {'colon.dright' 'colon.dmid'} ({'colon'} ~> {'colon.dmid'}) {'colon'}
|
||||||
|
@ -247,7 +270,7 @@ export : define [apply para glyphList] : begin
|
||||||
.subtables : list
|
.subtables : list
|
||||||
chain-rule [flatten fwtrail hwtrail fwopen hwopen fwmid hwmid] (fwopen ~> hwopen)
|
chain-rule [flatten fwtrail hwtrail fwopen hwopen fwmid hwmid] (fwopen ~> hwopen)
|
||||||
chain-rule (fwclose ~> hwclose) [flatten fwtrail hwtrail fwclose hwclose fwopen hwopen fwmid hwmid]
|
chain-rule (fwclose ~> hwclose) [flatten fwtrail hwtrail fwclose hwclose fwopen hwopen fwmid hwmid]
|
||||||
|
|
||||||
# locl, SRB
|
# locl, SRB
|
||||||
local srbSubtable null
|
local srbSubtable null
|
||||||
if para.isItalic
|
if para.isItalic
|
||||||
|
@ -301,6 +324,6 @@ export : define [apply para glyphList] : begin
|
||||||
set languages.'cyrl_MKD ' {.features [{'locl_srb'}.concat commonList]}
|
set languages.'cyrl_MKD ' {.features [{'locl_srb'}.concat commonList]}
|
||||||
set languages.'cyrl_BGR ' {.features [{'locl_bgr'}.concat commonList]}
|
set languages.'cyrl_BGR ' {.features [{'locl_bgr'}.concat commonList]}
|
||||||
|
|
||||||
local GSUB {.languages languages .features features .lookups lookups}
|
local GSUB {.languages languages .features features .lookups lookups .lookupOrder lookupOrder}
|
||||||
|
|
||||||
return [object GSUB GPOS GDEF]
|
return [object GSUB GPOS GDEF]
|
|
@ -350,13 +350,13 @@
|
||||||
<tr class="first"><th>Feature Tags</th><th>Designed For</th><th>Sample</th></tr>
|
<tr class="first"><th>Feature Tags</th><th>Designed For</th><th>Sample</th></tr>
|
||||||
<tr><td><i>No Ligation</i></td><td> </td><td class="nolig"><pre>-<< -< <-- <--- <<- <- -> ->> --> ---> >- >>- <-> <--> <---> <----> <!--
|
<tr><td><i>No Ligation</i></td><td> </td><td class="nolig"><pre>-<< -< <-- <--- <<- <- -> ->> --> ---> >- >>- <-> <--> <---> <----> <!--
|
||||||
=<< =< <== <=== <<= <= => =>> ==> ===> >= >>= <=> <==> <===> <====> <!---
|
=<< =< <== <=== <<= <= => =>> ==> ===> >= >>= <=> <==> <===> <====> <!---
|
||||||
:= :- :+ :< :> <: >: +: -: =: a:b a::b a:::b</pre></td></tr>
|
:= :- :+ :< :> <: >: +: -: =: :* ::* <*> *: *:: a:b a::b a:::b</pre></td></tr>
|
||||||
<tr><td>calt</td><td><i>Default setting set in<br>most IDEs and editors</i></td><td><pre><s>-<<</s> <s>-<</s> <-- <--- <s><<-</s> <- -> <s>->></s> --> ---> <s>>-</s> <s>>>-</s> <-> <--> <---> <----> <!--
|
<tr><td>calt</td><td><i>Default setting set in<br>most IDEs and editors</i></td><td><pre><s>-<<</s> <s>-<</s> <-- <--- <s><<-</s> <- -> <s>->></s> --> ---> <s>>-</s> <s>>>-</s> <-> <--> <---> <----> <!--
|
||||||
<s>=<<</s> <s>=<</s> <== <=== <s><<=</s> <s><=</s> => <s>=>></s> ==> ===> <s>>=</s> <s>>>=</s> <=> <==> <===> <====> <!---
|
<s>=<<</s> <s>=<</s> <== <=== <s><<=</s> <s><=</s> => <s>=>></s> ==> ===> <s>>=</s> <s>>>=</s> <=> <==> <===> <====> <!---
|
||||||
:= :- :+ :< :> <: >: +: -: =: a:b a::b a:::b</pre></td></tr>
|
:= :- :+ :< :> <: >: +: -: =: :* ::* <*> *: *:: a:b a::b a:::b</pre></td></tr>
|
||||||
<tr><td>XHS_, XPTL</td><td>Haskell, PatEL</td><td style="font-feature-settings: "XHS_" 1"><pre>-<< -< <-- <--- <<- <- -> ->> --> ---> >- >>- <-> <--> <---> <----> <!--
|
<tr><td>XHS_, XPTL</td><td>Haskell, PatEL</td><td style="font-feature-settings: "XHS_" 1"><pre>-<< -< <-- <--- <<- <- -> ->> --> ---> >- >>- <-> <--> <---> <----> <!--
|
||||||
=<< =< <== <=== <<= <s><=</s> => =>> ==> ===> <s>>=</s> >>= <=> <==> <===> <====> <!---
|
=<< =< <== <=== <<= <s><=</s> => =>> ==> ===> <s>>=</s> >>= <=> <==> <===> <====> <!---
|
||||||
:= :- :+ :< :> <: >: +: -: =: a:b a::b a:::b</pre></td></tr>
|
:= :- :+ :< :> <: >: +: -: =: :* ::* <*> *: *:: a:b a::b a:::b</pre></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user