fontaine
fontaine copied to clipboard
Support for line number and mode line faces
Thanks for the great package.
I've been using a less sophisticated hand-rolled version to help with switching between working on my laptop and working at a wide-screen monitor.
Would you consider adding support for mode line and line number faces? I have grown attached to having the line number height be smaller than the main text and italicizing the line number face.
Another face that would be handy to be able to configure is the mode line face, which I also find is more visually appealing when it is slightly smaller than the main text.
From: Ashlin Eldridge @.***> Date: Tue, 16 Jan 2024 12:28:30 -0800
Thanks for the great package.
You are welcome!
I've been using a less sophisticated hand-rolled version to help with switching between working on my laptop and working at a wide-screen monitor.
Would you consider adding support for mode line and line number faces? I have grown attached to having the line number height be smaller than the main text and italicizing the line number face.
Good idea! Though note that we do not support a different slant for the given face. So we would need to add that feature as well.
Another face that would be handy to be able to configure is the mode line face, which I also find is more visually appealing when it is slightly smaller than the main text.
I like this! Is it the 'mode-line', 'mode-line-active', and 'mode-line-inactive' faces you have in mind?
-- Protesilaos Stavrou https://protesilaos.com
Sorry for being slow to respond, by the way. My typing time is limited due to a pain in a my left arm.
Thanks for the response, @protesilaos. Sorry to hear about your arm - I do hope it is improving.
Good idea! Though note that we do not support a different slant for the given face. So we would need to add that feature as well.
Ah, I see.
I like this! Is it the 'mode-line', 'mode-line-active', and 'mode-line-inactive' faces you have in mind?
In my config, I set both the mode-line-active
and mode-line-inactive
faces. I found that if I only set mode-line
then the inactive mode line will use a different face even though mode-line-inactive
inherits from mode-line
(didn't dig into why).
Hello again! I just added support for the extra faces. I included the header-line
as well. Will also do it for the tab-bar-mode
and tab-line-mode
.
Next up is to support a slant per face.
Thanks a lot, @protesilaos! I appreciate the work. Will update and check it out.
Hello again! Recent changes include support for font slants as well. If you do try the development version, please let me know how it goes.
Hi @protesilaos, I've tried out the changes and they work really well! I can replace my custom setup with Fontaine now!
I did notice a couple of inconsistencies with the other faces though:
- The mode line and line number families don't seem to fall back to
:default-family
and I need to specifically set:mode-line-active-family
,:mode-line-inactive-family
, and:line-number-family
. - When using relative/decimal font heights for the two mode line faces, something odd happens with
doom-modeline
where the active mode line gets displayed with multiple different font sizes whereas the inactive mode line does not. This doesn't happen when using absolute sizes. The screenshot below shows the issue - I've specified a face height of 1.2 for both:mode-line-active-height
and:mode-line-inactive-height
. This seems to be adoom-modeline
issue, however, as when I used the default mode line the issue doesn't occur.
From: Ashlin Eldridge @.***> Date: Sun, 25 Feb 2024 13:12:27 -0800
Hi @protesilaos, I've tried out the changes and they work really well! I can replace my custom setup with Fontaine now!
Very well!
I did notice a couple of inconsistencies with the other faces though:
Thank you for taking the time to report these!
1 The mode line and line number families don't seem to fall back to : default-family and I need to specifically set : mode-line-active-family, :mode-line-inactive-family, and : line-number-family.
Okay, I will check this out. Note that I changed how fallbacks work, so that it resolves to the values of the underlying face. These should, in principle, be 'unspecified' (meaning that the 'default' values are used).
2 When using relative/decimal font heights for the two mode line faces, something odd happens with doom-modeline where the active mode line gets displayed with multiple different font sizes whereas the inactive mode line does not. This doesn't happen when using absolute sizes. The screenshot below shows the issue - I've specified a face height of 1.2 for both :mode-line-active-height and :mode-line-inactive-height. This seems to be a doom-modeline issue, however, as when I used the default mode line the issue doesn't occur.
Strange... Can you do M-x list-faces-display and check the doom-modeline faces? Set the Fontaine mode line heights to something easy to spot, like 2.0, and then try to find the faces not covered by this. It could be a doom-modeline issue or something to do with how the Fontaine fallback values work.
-- Protesilaos Stavrou protesilaos.com
Apologies for the very late reply. I'm quite sure this issue is doom-modeline
specific at this point. However, I wasn't able to use list-faces-display
to diagnose the specific faces in doom-modeline
that were problematic as the sizes of the faces aren't previewed for me. Is that what you were suggesting? That I should try spot the faces that don't appear to have 2.0 applied?
I did see https://github.com/seagle0128/doom-modeline/issues/704 and thought it could be related but it the corresponding PR doesn't seem to affect the issue I described.
It's not a big deal for me to specify absolute face sizes to work around this. So I'm still able to use Fontaine and it's an improvement over what I had before.