Sublime Forum

Dev Build 3145


Dev Build 3147 some font ligatures aren’t working, i’m on MacOS High Sierra 10.13.

Also @jps will there be an option to choose a specific font just for font ligatures? I like Fira Code ligatures but not a massive fan of the font, so If I could use their ligatures with Roboto Mono like it’s capable of doing in Atom that would be great.



Just a quick shout out, @jps and @wbond: thanks. Sublime remains a fantastic and irreplaceable part of my toolkit, and it’s great to see it continue to move forward. It’s not without its flaws, but the good vastly, vastly outweighs the bad. My license is one of the best investments I’ve ever made, and I’m actively looking forward to getting a chance to further support its development with future paid upgrades.



My problem was when updating from build 3144 to build 3147, the font size increased for the same point 14. Using font bigger than before has the problem of free space on the screen, which reduced by a few lines. But I did not realize I could try to reduce it by fractional points as 13.5 instead of only 13 or 14. Doing 13.5 on build 3147 is renders the same size as 14 on build 3144.



@petert82: What hardware and monitor are you running? Have you done anything along the lines of color calibrating your monitor?

The way 3147 detects monitor gamma has changed, and it looks like it’s using the wrong gamma value for your setup.



Consolas used to default to GDI rendering, now it defaults to DirectWrite. You can set this explicitly via font_options, but you won’t get ligatures showing with GDI

1 Like

How to enable ligatures?
Strange thing about the default Consolas font

With regards to ligatures, text is first tokenised within regards to the rules in the syntax definition, and then shaped. If text crosses token boundaries (i.e. has a different scope applied to it), then it won’t get transformed into a ligature. If you’re unsure, then change the current syntax to Plain Text, and the ligatures should show as expected.


Ligatures only show in some languages

And I didn’t read too carefully :blush:



They do indeed work when I change the syntax to plain text, but I want them to work when the syntax is php.

How do I go about this?

1 Like


The new references are great, I noticed that symbolIndexTransformation applies to the reference index too. Could it use a separate Transformation (e.g. referenceIndexTransformation)? This would allow to index a region as a symbol with a symbolIndexTransformation as well as a reference with a different referenceIndexTransformation



@devcarlos They are currently scoped differently:

!: embedding.php text.html.basic meta.embedded.block.php source.php keyword.operator.logical.php
==: embedding.php text.html.basic meta.embedded.block.php source.php keyword.operator.comparison.php

If the syntax is changed to capture and scope !== together, then they will be transformed into the proper ligature.



Most likely you are running into, or some variant.

1 Like


Yep, also works in comments, but notice the colour of my comment has changed too? Is this something that is going to be fixed in the next update?



Thanks but i’m still a little confused to how i’d go about fixing this? is there something I can do on my end or do I need to wait for an update to be pushed out?



Should I split this out from this PR?

1 Like


You can try to contribute to the Default packages (specifically PHP), but you’ll have to read up on syntax files. Or create an issue over in the Default packages, and maybe one of the contributors will take a look. Now that ligatures are available, I’m almost certain, someone with the know how will be bugged enough to fix it :slight_smile:.

Repo is here:



Looks like @jfcherng may have beat you to creating the issue :wink:.



I don’t think that is strictly necessary. I’m working on something else right at the moment, but I’ll work on getting fixes merged soon.



@wbond will there be an option to use something like Fira Code as our secondary font for ligatures only and our primary font for everything else?



I don’t have an answer for that right now.



I know people in Atom do that with CSS to add Fira Code ligatures to other fonts like Operator Mono, or some other font that doesn’t cost 200 bucks :smirk:. Some people like Fira Code, but others only like the ligatures.