Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid font in org-mode #56

Closed
seagle0128 opened this issue May 27, 2016 · 13 comments
Closed

Invalid font in org-mode #56

seagle0128 opened this issue May 27, 2016 · 13 comments

Comments

@seagle0128
Copy link
Contributor

seagle0128 commented May 27, 2016

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.

@oneKelvinSmith
Copy link
Owner

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.

@seagle0128
Copy link
Contributor Author

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.

Monokai theme:
capture1

tsdh-dark theme:
capture2

Thanks for your investigation!

@oneKelvinSmith
Copy link
Owner

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)

@seagle0128
Copy link
Contributor Author

seagle0128 commented Jun 2, 2016

Thanks!
The new screenshot is below. Same issue :(

capture

@seagle0128
Copy link
Contributor Author

seagle0128 commented Jun 7, 2016

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!

@oneKelvinSmith
Copy link
Owner

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 👍

@seagle0128
Copy link
Contributor Author

seagle0128 commented Jul 26, 2016

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))))

@oneKelvinSmith
Copy link
Owner

Would you like to make a pull request? I'll be happy to merge it in 👍

@seagle0128
Copy link
Contributor Author

seagle0128 commented Jul 28, 2016

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.

@oneKelvinSmith
Copy link
Owner

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...

@oneKelvinSmith
Copy link
Owner

Re-opening this because I think it might be related to #62.

@seagle0128
Copy link
Contributor Author

seagle0128 commented Sep 4, 2016

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.

@oneKelvinSmith
Copy link
Owner

This should be fixed with fe409de.

Thanks again for updating 👍

seagle0128 added a commit to seagle0128/.emacs.d that referenced this issue Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants