DONE: Enable programming ligatures in fonts

Make a request or discuss new features.
Post Reply
User avatar
pjj
Posts: 1718
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

DONE: Enable programming ligatures in fonts

Post by pjj » 20 May 2020 09:53

Recently I have read an interesting and informative article about fonts used in coding and decided to try out Iosevka and Fira Code. I didn't like the former, but found the latter quite appealing thanks to its use of ligatures
Image
It has other interesting features, too. I have downloaded & installed Fira Code, but alas RJ TE as of now doesn't seem to support it right of the box (while e.g. Windows Notepad does). Could you look into it and give us ligatures and other whatnots of Fira Code, please?

...Notabene Fira Code comes in five weights: Light, Regular, Medium, Semi Bold and Bold. It would be cool to be able to choose among them in highlighters settings (i.e. make regular the main font, then set light to comments, variables to semi bold etc.)

Edit: I just noticed ligatures worked, and they worked very well indeed, but only in comments (rendered in normal font or italics).
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

akari
Posts: 20
Joined: 16 Aug 2013 09:07

Re: Enable programming ligatures in fonts

Post by akari » 21 May 2020 03:36

I try fira code a long time ago, the weird thing happens in Rj TextEd, sometimes it works, sometimes it doesn't..
But fira code still work in Rj TextEd sometime compare to cascadia (https://github.com/microsoft/cascadia-code).

User avatar
Rickard Johansson
Site Admin
Posts: 5929
Joined: 19 Jul 2006 14:29

Re: Enable programming ligatures in fonts

Post by Rickard Johansson » 21 May 2020 14:30

Seems to be working now after a few minor changes. I'll probably release v14.52 early next week.

Ligatures.png
Ligatures.png (10.49 KiB) Viewed 177 times
BTW. I used "Cascadia Code"

User avatar
pjj
Posts: 1718
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: DONE: Enable programming ligatures in fonts

Post by pjj » 21 May 2020 15:06

Wonderful! Tusen tack!

Is it Cascadia Code on the screenshot? Seems similar to Fira Code (perhaps it's more rounded). I'll give it a try.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

User avatar
pjj
Posts: 1718
Joined: 13 Oct 2009 13:48
Location: Kraków, Poland

Re: DONE: Enable programming ligatures in fonts

Post by pjj » 28 May 2020 13:56

They work, and they work great (många tack ännu en gång!), however there is one aspect where they appearance could be, possibly, improved:
ligatures.png
ligatures.png (5.14 KiB) Viewed 81 times
As you see, in some contexts they don't work; I guess it's when regex you use for syntax highlighting kicks in (because they choke on angle brackets). Or maybe I'm wrong and it could be easily fixed? I use Fira Code, btw.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus

Post Reply