tonsky / FiraCode

Free monospaced font with programming ligatures
SIL Open Font License 1.1
77.26k stars 3.1k forks source link

Something wrong with character widrth\letterspacing with bold width on sizes other than 13 in emacs. #257

Open hjri opened 8 years ago

hjri commented 8 years ago

Here's how Fira Code looks like in emacs when set to size 13. Note the embolden selection in lower section - it looks fine. Fira Code 13

The very same screen, but only size changed from 13 to 14. Notice that embolden selection now appears narrower than other lines. Fira Code 14

Changing spacing and width does not help at all.

hjri commented 8 years ago

current workaround is this:

  (set-face-attribute 'default nil :family "Fira Code")
  (set-face-attribute 'default nil :height 115)
  (set-face-attribute 'default nil :weight 'regular)
  (set-face-attribute 'bold nil :family "Fira Code")
  (set-face-attribute 'bold nil :height 117)
  (set-face-attribute 'bold nil :weight 'bold)

I had to set bold face to a bigger height...

thegeorgeous commented 7 years ago

@hjri, how did you make it work with helm? Helm crashes when I setup ligatures

hjri commented 7 years ago

IIRC I've used prettify-symbols-mode which does not affect helm. I do not use FiraCode nor ligatures in emacs now so i'll probably won't be of any help.

pavelkogan commented 7 years ago

I have this problem with size 13 as well, and the workaround above didn't work for me.

SavchenkoValeriy commented 7 years ago

I have the same issue with any size.

gramonov commented 7 years ago

If anyone is still interested in this, it happened to me a few times (arch linux 4.13.4-1-ARCH, emacs 25.3.1). In my case, emacs couldn't find the bold version of the font, since setting font to Fira Code Bold-12 in emacs config complained about a missing font, whereas Fira Code Medium-12 font worked just fine.

After trying to fight it I simply replaced bold font with the medium one by renaming FiraCode-Medium.otf to FiraCode-Bold.otf. Hacky, but works for me and makes the font not too bold.

std4453 commented 5 years ago

Any updates on this issue? I encountered this problem while writing a terminal emulator, and tried to cluster characters of the same style (font, size, weight, color, etc.), when strings in Fira Code Bold rendered in a different width with strings in Fira Code Medium.

It turns out that other terminals (e.g. xterm) rendered characters one-by-one with a fixed width, which prevents the problem from revealing itself.

tonsky commented 5 years ago

Does v2 solves that for you?

up-to-you commented 4 years ago

Perhaps it's somehow related #900 Pls, read JB issue for details about Fira Code Regular / Retina.