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

How to maintain the original settings, such as fonts after theme changing? #30

Open
Grant-S-Z opened this issue Dec 26, 2023 · 2 comments

Comments

@Grant-S-Z
Copy link

With the theme changing, the fonts change too. Any way to avoid that?

@swflint
Copy link
Collaborator

swflint commented Dec 26, 2023

What themes are you using? I suspect that one or both of the themes sets some font settings.

Note, you could add a function to theme-changer-post-change-hook (which, see) which unconditionally sets the font to your preference.

@Grant-S-Z
Copy link
Author

I use the two themes: doom-one-light and doom-one.
My related settings:

(add-to-list 'load-path "~/.emacs.d/repos/theme-changer")
(require 'theme-changer)
(change-theme 'doom-one-light 'doom-one)

(use-package emacs
  :init
  (progn
    (set-face-attribute 'default nil    ;:font "Fantasque Sans Mono"
					:font "Inconsolata"
					:height 130)
    (dolist (charset '(kana han symbol cjk-misc bopomofo))
      (set-fontset-font (frame-parameter nil 'font)
			charset (font-spec :family "LXGW WenKai")))))

I think fonts settings will not be loaded when the themes transfer.
As for adding to theme-changer-post-change-hook, it seems like a good idea. I'll try it later.

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