Wrong font rendering


The line length and what Atom thinks about the line length seem to be out of whack.

In the following image, there is no space in that string, and the cursor is at the end of the line!

With the cursor at the end of the line in the above image, I hit x, and here is the result:

I’ve tried various fonts (Menlo, Monaco, Inconsolata, Fantasque Mono, Fira Mono, Consolas), all had the same issue, though some (e.g. Consolas) were quite small and then I increased the font size and then it happened again.

I’ve tried atom --safe, too. It happened, too.

I’ve tried various themes, including Atom Light. It happened, too.


Could you give the following information?

  • Which version of Atom are you using?
  • What OS and version are you running?
  • Do you have the Shadow DOM feature enabled?


Darn, I just remembered that I forgot something. But you were quicker!

This is 0.177.0, and a couple of versions ago it was still okay. (Not quite sure about 0.176.) This is OSX Yosemite. It happens for all four combinations of

  • with/without --safe
  • with/without Shadow DOM


Could you post your config.cson and styles.less files?


Oh my! My config.cson seems to contain a lot of cruft. So, I moved it out of the way and restarted Atom and then did a couple of settings, but still the problem persists.

    userId: "69d2f7cd-a532-eba8-5fa2-a471a8dd2a33"
    showOnStartup: false
    themes: [
    invisibles: {}
    fontFamily: "Menlo"
    fontSize: 11

Will work on styles.less next.


Okay, it was styles.less. Will use the chance for a fresh start, as well. Not as much cruft as in config.cson, but still.

Thanks a bunch, @postcasio! Very helpful.


The final result is: it was text rendering.

.workspace {
  text-rendering: optimizeLegibility;

Adding the above to styles.less makes it misbehave. So I will remove it again. Hm. [trying] Ah. It moved the characters slightly closer together. Removing it spaced them out a bit. Hm. Not sure what that means. I was trying to be too clever I guess.


The optimizeLegibility setting on text-rendering enables advanced kerning features of fonts at the expense of rendering speed. So it may be that whatever technique that Atom uses for resolving font metrics doesn’t take this into account.


Quite possible. Note that it was working fine until recently (in earlier versions of Atom).

In any case, no issues, I’m satisfied with leaving the setting out.


Recent versions of Atom include upgrading to newer versions of Chromium … so that may well be the reason that it changed.


Sorry for resuming this somewhat old-ish topic, but I’d like to point out my experiment on Chrome 40 (see my comment on this issue https://github.com/atom/atom/issues/3821#issuecomment-74414131), which I think shows how Chrome already handles ligatures correctly, which makes me doubt about a Chromium issue…


Chrome ≠ Chromium. Have you tested it on Chromium?


No, sorry, I don’t currently have a Chromium installation on my win machine, and I’m afraid my machine is way too weak to build chromium in a reasonable time… How well-suited is the build provided here https://download-chromium.appspot.com/ for such a test?


I’d suspect that if it runs, it would be pretty decent.


It runs, I loaded my test and it works as good as Chrome does…

P.S. I have to say, having never before tried to code with ligatures, that it would too feel quite amazing to have these eye-candies for use for languages other than Haskell :smile:


Check this out (haven’t tried it myself yet though):


Yeah I know about that one, quite cool (although I prefer Source Code Pro as a fontface), but it has the same problems Hasklig has on Atom… But, like Hasklig, works like a charm in Chrome/Chromium.


Has any progress been made on this? Its been almost a year and ligatures have never worked properly in atom.


Yes they are working on it, see the roadmap :smiley:


There’s an issue tracking font measurement on atom/atom that you should subscribe to for updates. I am on my way to a meeting, unfortunately, so I can’t find it right now.