Invalid font in org-mode
seagle0128 opened this issue ยท 13 comments
I am using emacs 25.0.94.2 on Windows with org-mode 8.3.4/8.2.10.
The fonts in org-agenda-structure seem invalid, and the fonts cannot be zoomed in/out correctly.
Hey @seagle0128,
Thanks for opening the issue. It's going to take me some time to get a windows environment set up for testing. Would you be able to give me a screenshot/gif showing the problem?
Thank you.
Thanks for the response.
I attached the screenshots below.
I am using Emacs 25.0.94.2 from https://sourceforge.net/projects/emacsbinw64/files/latest/download?source=files. I zoomed in the fonts (x4). I think it's an incompatibility issue with emacs 25. I remember it doesn't exist before. It may exist on Linux.
Thanks for your investigation!
Ok, so I've managed to get emacs 25 on my Mac. This, unfortunately, hasn't helped me reproduce the problem.
Would you mind trying to change these variables to see if it has any effect? Hopefully we can narrow down what is causing the issue.
(setq monokai-height-plus-1 1.0
monokai-height-plus-2 1.0
monokai-height-plus-3 1.0
monokai-height-plus-4 1.0
monokai-height-minus-1 1.0)
I believe it's a bug of Emacs 25.0.94. The issue exists when I use some other themes. If I load the same theme manually again, the issue disappears.
Closed it here. Thanks for your patience!
Thanks for the update.
I was definitely out of my depth on this one. Although installing Emacs 25 has pointed out a few things I'd like to learn more about, so all in all this has been a good experience ๐
I found a workaround to fix this issue. Load theme twice on Windows as below.
I don't know the reason, but I'd like update here.
(add-hook 'after-init-hook '(lambda () (load-theme 'monokai t)))
;; FIX: Invalid font in org-mode on Windows
(when (and sys/win32p (> emacs-major-version 24))
(add-hook 'window-setup-hook '(lambda () (load-theme 'monokai t))))
Would you like to make a pull request? I'll be happy to merge it in ๐
I checked the codes, and my codes cannot be merged into monokai-theme.el. You just need to add my codes into your init.el.
Sigh, I totally misunderstood :)
Thank you for updating this thread. I'll add your example code to the readme for people who have the same issue in the future.
I feel very silly now...
Re-opening this because I think it might be related to #62.
Yes, it works.
Before loading the theme:
(setq monokai-org-use-variable-pitch nil)
But it's curious the issue appears in Emacs 25, and it disappears if loading theme again.
I think the README should be updated again.
This should be fixed with fe409de.
Thanks again for updating ๐