ToxicFrog/Ligaturizer

New Pipe operator?

chrisvacc opened this issue · 9 comments

In R (statistical programming language) pipes are written as %>% which look horrid. Is there any way to add support for this in the font, or explain to me how I might be able to do it myself? Btw, this font creator is amazing. I always recommend it my friends.

All this tool does is copy ligatures from Fira Code into other fonts, There's no ligature for %>% in Fira Code, so Ligaturizer has no way of adding it.

If there's a different font that has that ligature, the ability to add ligatures from different fonts is something I've wanted to add for a while (#22) and just haven't had time to work on.

I'm glad you're enjoying it otherwise :)

Yea, there’s definitely a way to add any lig you want… you need FontForge, Fontlab, or Glyphs which all allow you to make your own font.

https://en.wikipedia.org/wiki/FontForge with that you can add any ligature and symbol you want… I’ve just never used it

But okay… I’m sure you know this but for anyone reading, almost all modern fonts have ligatures. Liguatures are used for example:

https://i.imgur.com/pUlPBkb.png

But programmers who want to make programming fonts repurpose the ligature feature in font creation tools. You can do that in FontForge, etc I just don’t know how to do it. You would just make the ligature you want and paste in the symbol.

Yes, Fontforge can be used to add new ligatures to a font, and in fact that's what Ligaturizer uses to do all the font manipulation. But the whole point of Ligaturizer is doing this automatically by patching them in from an existing font (currently just Fira Code). The fonts in the release package weren't hand-made, they were automatically created by the Ligaturizer script.

Like I said, if there's an existing %>% ligature in another font I'd be fine with adding a feature that lets Ligaturizer copy ligatures from other fonts as well, although I may not have time to work on it anytime soon.

In that case you could just take your edited version of Fira Code, replace the default one, edit ligatures.py to add the new ligature, and run Ligaturizer to add the new ligature to all the derived fonts -- no need for any changes to Ligaturizer. But as far as I know such an edited version of FC doesn't exist.

As I keep saying, I have neither the skill nor the interest to create new ligatures ex nihilo. Furthermore, even if I did, it would be outside the scope of this project. If you want to do so, or know someone who does, there's nothing stopping you from making those edits yourself and then feeding your edited copy of Fira Code to Ligaturizer.