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

strange modeline height after buffer content changed #278

Closed
hekinami opened this issue Dec 16, 2019 · 12 comments
Closed

strange modeline height after buffer content changed #278

hekinami opened this issue Dec 16, 2019 · 12 comments
Labels
good first issue Good for newcomers

Comments

@hekinami
Copy link

hekinami commented Dec 16, 2019

Describe
A clear and concise description of what the bug is.

while content of buffer changed, the modeline height was doubleld and that is strange.

I installed doom-modeline with package.el with newest package (20191209.1736) and the issue occurred.

If I downgraded to a old one (e.g. doom-modeline-20191029.1741.tar) it works in the correct way.

Steps and Expected
Steps to reproduce the behavior:
A clear and concise description of what you expected to happen.

just open a file and change it.

Environment:

  • OS: Linux Mint
  • Version 19
  • Package version 20191209.1736

Additional context
Screenshots, recordings, logs and/or messages...
image

image

@seagle0128
Copy link
Owner

Emacs version? What I can see is the buffer state icon is incorrect in screenshot 2.

@hekinami
Copy link
Author

26.3

@seagle0128
Copy link
Owner

seagle0128 commented Dec 24, 2019

What's the font are you using? Please check why the icons are incorrect in your env.

@hekinami
Copy link
Author

According to information I have got now, I don't think it's an issue related directly to the configuration (e.g. font) of other part of emacs. Because just as I mentioned in the first post, if I downgrade doom-modeline to older version, it works fine. (refer to the screenshot)

image

image

I don't know how to check the actual font is used by doom-modeline, any hint?

@seagle0128
Copy link
Owner

seagle0128 commented Dec 25, 2019

I couldn't reproduce this issue. Can you reproduce it with emacs -Q?

@hekinami
Copy link
Author

I found it's conflicting with https://github.com/tumashu/cnfonts which is a font configuration tool for Chinese fonts. cnfonts changed the default font setting and I think which is used by doom-modeline.

My thinking is if the display in the mode line is controlled by a face (I am not sure which one) then I can specify the font explicit for it (I am not sure which font should be either)

Any hint?

@seagle0128
Copy link
Owner

seagle0128 commented Dec 26, 2019

This issue was reported to cnfonts long time ago. Please refer to tumashu/cnfonts#98. My suggestion is NOT using cnfonts with all-the-icons, or set the fallbacks yourself.

Reference:
https://github.com/tumashu/cnfonts/blob/4af009919ab8965afe8b0daacef1ad13606da5bc/cnfonts.el#L934

@seagle0128 seagle0128 added good first issue Good for newcomers invalid This doesn't seem right labels Dec 26, 2019
@hekinami
Copy link
Author

hekinami commented Dec 29, 2019

for whom using cnfonts and doom-modeline(all-the-icons) together, we have a simple solution to make them coexist. Just configure your cnfonts in the following way.

(use-package cnfonts
  :ensure t
  :after all-the-icons
  :hook (cnfonts-set-font-finish
         . (lambda (fontsizes-list)
             (set-fontset-font t 'unicode (font-spec :family "all-the-icons") nil 'append)
             (set-fontset-font t 'unicode (font-spec :family "file-icons") nil 'append)
             (set-fontset-font t 'unicode (font-spec :family "Material Icons") nil 'append)
             (set-fontset-font t 'unicode (font-spec :family "github-octicons") nil 'append)
             (set-fontset-font t 'unicode (font-spec :family "FontAwesome") nil 'append)
             (set-fontset-font t 'unicode (font-spec :family "Weather Icons") nil 'append)))
  :config
  (cnfonts-enable))

@seagle0128 seagle0128 removed the invalid This doesn't seem right label Dec 31, 2019
@seagle0128
Copy link
Owner

Thanks for the update, @hekinami !

@hekinami
Copy link
Author

hekinami commented Sep 9, 2020

by 2020/09/10, cnfonts and all-the-icons have seemingly already solved conflict with each other, I can tested in emacs 27 with following configure, and it works well for me. We don't have to specify the fonts for unicode characters ourselves any more.

    (use-package cnfonts
      :ensure t
      :config
      (cnfonts-enable))

    (use-package all-the-icons
      :ensure t
      :after cnfonts
      )

@seagle0128
Copy link
Owner

Thanks, @hekinami . Although I don't see any changes for all-the-icons in cnfonts. Maybe just because you change the loading sequence?

@hekinami
Copy link
Author

Not sure, but I used the same configuration for emacs 26.3 and 27.1, and likely they don't work in the same way.

Anyway, if someone else still report the same issue, let's discuss then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants