2

I have been trying to get FiraCode to work inside of Doom Emacs and have mostly succeeded. Everything works except for italics, even bold and ligatures are fine strangely enough.

When I switch to another font in Doom Emacs I can also get everything.

Does anyone have some ideas on how to get this to work?

The relevant sections from my config:

(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 12)
      doom-variable-pitch-font (font-spec :family "Hack" :size 12)
      doom-big-font (font-spec :family "FiraCode Nerd Font" :size 17))

If I replace FiraCode Nerd Font with something else, say hack for example, everything works fine but this doesn't.

3
  • I think Fira Code doesn't come with an italic variant. You might try :slant oblique instead and see if emacs can created a slanted variant instead. – amitp Nov 7 '20 at 4:04
  • I had the same problem and it does not seem that Fira Code will get an italic variante anytime soon (if ever). I just changed my font to JetBrainsMono, which is as nice as Fira Code and has italic. Some other good options are Source Code Pro, victor mono, etc. – darcamo Nov 7 '20 at 14:43
  • I can't find where I read this but I think the issue with Fira Code is that the characters are not the same size in the default script vs. the italic script and Emacs won't show font variants of such fonts. Maybe someone can find the post I am talking about. – scribe Dec 2 '20 at 21:03
0

The Fira Sans typeface contains an italic, so you could use that for faces which require it and keep Fira Code as default...

(set-face-attribute 'org-agenda-date nil :slant italic :weight bold :family "Fira Sans")
2
  • This does add bolding and icons to certain areas but still doesn't have italics. I think I will just switch to a different font – destroyer449 Nov 7 '20 at 23:32
  • Fira Sans has italics, but Fira Code and Fira Mono don't. Maybe check if all the variants and weights are installed? – zzkt Nov 8 '20 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.