Hello guys i am experiencing some font issues using the theme monokai
on windows 10
and emacs 27.2
. Emacs seems to compile everything quite nice even there are not error and warnings. However, when i load an org
file the font and sizes are gone in other words just the colors are loaded. i looked through the monkai website and there is a piece of code pointing out those font issues (see code below in the case you don't want to take a look at the website)
(add-hook 'after-init-hook '(lambda () (load-theme 'monokai t)))
(when (and sys/win32p (> emacs-major-version 24))
(add-hook 'window-setup-hook '(lambda () (load-theme 'monokai t))))
In the website also there is a thread on this issue (thread number #56) and the same code is presented. However, they mentioned that monokai
must be loaded twice in order to solve the font issue.
Well, in my case i placed the code in my init.el
file
This is my code:
;; Using monokai theme
(use-package monokai-theme
:config
(load-theme 'monokai t))
(add-hook 'after-init-hook '(lambda () (load-theme 'monokai t)))
(when (and sys/win32p (> emacs-major-version 24))
(add-hook 'window-setup-hook '(lambda () (load-theme 'monokai t))))
The next error appears:
Symbol's value as variable is void: sys/win32p
Guys i have no clue how to solve it because of sys/win32p
i assuming that of course this is realted to the system windows. How can i solve it?
Then i decided to remove the sys/win32
along with the and
and the ()
, now the code compiles. But the font issue persist.
Look, the info was posted on 2016, this info is already old, therefore i changed the part that mentioned the emacs version from 24 to 26 like this > emacs-major-version 26
As final thing i tried the same theme and the same code (of course without the windows part) in Ubuntu 20.04
and there is not font issue at all.
I don't know if this question was asked and solved before but i searched on internet for hours and i found not answer
init.el
file i use the keyword:font "Fira Code Retina"
or any other font and error appears saying that such font does not exits.