0

I have an issue setting fonts in GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26 which is under Windows 10. I set the font successfully, but when I reopen Emacs my setting is not respected and instead NexusSansPro which is not my font of choice is used.

I intentionally set the font via Emacs' Options->Set Default Font and Opetions->Save Options menus to make sure I'm not making any lisp mistakes.

The relevant part which is store by Emacs in init.el reads:

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "JetBrains Mono Light" :foundry "outline" :slant normal :weight light :height 143 :width normal)))))

I'm new to Windows and never had the issue in Linux. Not sure if this a Windows specific probelem or not...

0

Answering my own question:

The issue seems to be rooted in the "Light" word in the font name. Eventhough it was saved by Emacs' GUI, it was causing the issue replacing the line with following fix the issue, however, doesn't exactly give me the font I wanted

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "JetBrains Mono" :foundry "outline" :slant normal :weight light :height 143 :width normal)))))

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.