gonewest818 / dimmer.el

Interactively highlight which buffer is active by dimming the others.
GNU General Public License v3.0
267 stars 14 forks source link

Dimmer not remapping correctly in the presence of fallback fonts #22

Closed kqr closed 4 years ago

kqr commented 4 years ago

I'm not really sure how to put this, because I'm also not entirely sure what is wrong. I have a buffer open containing an unicode character that is not available in my primary font. Emacs, then, falls back to a different font.

image

However, when focus leaves this window in Emacs, and dimmer.el does its remapping thing, all of a sudden a different fallback font is picked:

image

This has probably always happened, but only recently did I switch fonts in such a way that the difference is very obvious (one symbol is tiny, the other is huge.)

Any idea what might be wrong and/or how I can fix it?

This does not happen when I turn off dimmer-mode.

gonewest818 commented 4 years ago

Huh. Which version of Emacs are you using?

kqr commented 4 years ago

26.2 on macOS 10.14.

kqr commented 4 years ago

Okay, I still have no idea what happened, but perhaps I can shed some more very dim light on the situation:

I noticed that the fallback font I had configured for these symbols[1] did not successfully render a completely different character, so I switched to another fallback font with greater Unicode support, and then this seems to have stopped happening.

I have read that Emacs' handling of fontsets can lead to results that appear random and arbitrary when trying to resolve a character, so we could just chalk it up to that and tell people to not configure insufficient fallback fonts. That said, I'm still not sure that is the entire explanation, and there seems to be something else going on that made Emacs resolve differently with and without fallback font support.

[1]: With (set-fontset-font t 'symbol fallback-font).

gonewest818 commented 4 years ago

Hi Chris, I'm not sure how to help here because I just don't understand how dimmer could be interfering with the selection of a fallback font. Is your new configuration holding up in testing? Perhaps we do just document here for posterity and close the ticket?

kqr commented 4 years ago

Yes, ish. It still feels brittle, but I also don't even know how to start to proceed with this so closing is fine. I'll reopen if it appears again. :)