larsenwork / monoid

Customisable coding font with alternates, ligatures and contextual positioning. Crazy crisp at 12px/9pt. http://larsenwork.com/monoid/
7.86k stars 170 forks source link

Fix ligature support for Kleisli arrows #156

Closed scriptbae closed 8 years ago

scriptbae commented 8 years ago

Currently, when working with Haskell (not that that's particularly relevant), inputting the Kleisli arrow operators: <=< and >=> results in the ligatures producing ≤< and ≥>, respectively.

This leads to readability issues when working with Haskell code in an environment where the font is Monoid.

I propose that either ligatures be implemented for the >=> and <=< trigraphs, or that these arrows explicitly remove the ligatures for >=/ and <=/ (if this is possible; I have extremely limited experience working with font construction).

This issue is related to #135.

larsenwork commented 8 years ago

@verandaguy screen shot took the simple approach, will upload later today after fixing other issues too

be5invis commented 8 years ago

@larsenwork Perhaps you can try

sub greater equal greater by kleislirightarrow;
sub greater equal by gteq;

Note the order, longer first.

larsenwork commented 8 years ago

@be5invis I use contextual substitution for ligatures so that syntax wouldn't work. (I do it to make the "ligatures" work in misc terminal applications

be5invis commented 8 years ago

@larsenwork So this? This is the “original” syntax for chaining substitution, and it can replace all characters matched in one rule.

sub greater' lookup geaterToKleislirightarrow equal' lookup toSpace greater' lookup toSpace;
sub greater' lookup geaterToGteq equal' lookup toSpace;
texastoland commented 8 years ago

I defer to your aesthetic sense but I'd personally prefer a connected arrow (long =).

scriptbae commented 8 years ago

@larsenwork the simple approach is good enough -- it's already a huge improvement when it comes to readability. Thanks a lot!

larsenwork commented 8 years ago

@be5invis huh, looks like I could simplify my substitutions quite a bit.