Add ligation: =>, <==, etc.

This commit is contained in:
be5invis 2016-02-27 03:33:49 +08:00
parent ffa5d23973
commit c179c1f2a5
2 changed files with 27 additions and 9 deletions

View File

@ -76,19 +76,19 @@ feature mkmk {
} mkmk;
# Programming ligatures
lookup arrowHyphenSubRight { sub hyphen by minus.arrowright; } arrowHyphenSubRight;
lookup arrowHyphenSubLeft { sub hyphen by minus.arrowleft; } arrowHyphenSubLeft;
lookup arrowHyphenSubMid { sub hyphen by minus.arrowmid; } arrowHyphenSubMid;
lookup arrowHyphenSubRight { sub [hyphen equal] by [minus.arrowright equal.arrowright]; } arrowHyphenSubRight;
lookup arrowHyphenSubLeft { sub [hyphen equal] by [minus.arrowleft equal.arrowleft]; } arrowHyphenSubLeft;
lookup arrowHyphenSubMid { sub [hyphen equal] by [minus.arrowmid equal.arrowmid]; } arrowHyphenSubMid;
lookup arrowExclamHTMLComment { sub exclam by exclam.htmlcommentstart; } arrowExclamHTMLComment;
lookup caltArrow1 {
# Arrows, sub
sub less hyphen' lookup arrowHyphenSubMid hyphen' lookup arrowHyphenSubMid greater;
sub less hyphen' lookup arrowHyphenSubMid greater;
sub less hyphen' lookup arrowHyphenSubLeft hyphen' lookup arrowHyphenSubLeft;
sub less [hyphen equal]' lookup arrowHyphenSubMid [hyphen equal]' lookup arrowHyphenSubMid greater;
sub less [hyphen equal]' lookup arrowHyphenSubMid greater;
sub less [hyphen equal]' lookup arrowHyphenSubLeft [hyphen equal]' lookup arrowHyphenSubLeft;
sub less hyphen' lookup arrowHyphenSubLeft;
sub less exclam' lookup arrowExclamHTMLComment hyphen' lookup arrowHyphenSubLeft hyphen' lookup arrowHyphenSubLeft;
sub hyphen' lookup arrowHyphenSubRight hyphen' lookup arrowHyphenSubRight greater;
sub hyphen' lookup arrowHyphenSubRight greater;
sub [hyphen equal]' lookup arrowHyphenSubRight [hyphen equal]' lookup arrowHyphenSubRight greater;
sub [hyphen equal]' lookup arrowHyphenSubRight greater;
} caltArrow1;
feature calt {
script latn;

View File

@ -141,4 +141,22 @@ symbol-block 'Ligature-oriented Subglyphs'
sketch
include glyphs.exclam
include : Translate (((RIGHTSB - WIDTH) + (arrowl + WIDTH)) / 2 - MIDDLE) 0
save 'exclam.htmlcommentstart'
save 'exclam.htmlcommentstart'
# =>
local dblarrowd : XH * [linreg 18 0.125 126 0.25 STROKE]
local sw : Math.min OPERATORSTROKE (dblarrowd * [clamp 0.45 0.75 ((1 - WHITENESS) * 1)])
local dblarrowr [clamp WIDTH (WIDTH * 2) (WIDTH + RIGHTSB - dblarrowd * 2)]
local dblarrowl (WIDTH - dblarrowr)
sketch
include : HBarTop SB dblarrowr (parenMid + dblarrowd) sw
include : HBarBottom SB dblarrowr (parenMid - dblarrowd) sw
save 'equal.arrowright'
sketch
include : HBarTop dblarrowl RIGHTSB (parenMid + dblarrowd) sw
include : HBarBottom dblarrowl RIGHTSB (parenMid - dblarrowd) sw
save 'equal.arrowleft'
sketch
include : HBarTop dblarrowl dblarrowr (parenMid + dblarrowd) sw
include : HBarBottom dblarrowl dblarrowr (parenMid - dblarrowd) sw
save 'equal.arrowmid'