GNU bug report logs -
#75728
Line-number face unaffected by text-scale-adjust when it inherits from fixed-pitch
Previous Next
Reported by: Jake <jforst.mailman <at> gmail.com>
Date: Tue, 21 Jan 2025 14:10:02 UTC
Severity: minor
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Jake <jforst.mailman <at> gmail.com>
> Date: Tue, 21 Jan 2025 14:08:56 +0000
>
> When line-number face inherits from fixed-pitch face, it is not affected by text-scale-adjust.
>
> The following example demonstrates how this behaviour is unique to line-number face; we observe that
> font-lock-comment-face has the expected behaviour of responding to text-scale-adjust.
>
> emacs -Q --eval "(progn (set-face-attribute 'line-number nil :inherit 'fixed-pitch) (set-face-attribute
> 'font-lock-comment-face nil :inherit 'fixed-pitch) (display-line-numbers-mode 1))"
> M-x text-scale-adjust, or C-x C-=
>
> Observe that the font size of the line numbers does not change, whereas the font size of
> font-lock-comment-face does.
This is actually a feature: the faces used by
display-line-numbers-mode don't automatically follow the text faces.
So if you really want that, you need to do something special with
these faces, if you want them both to inherit and to scale with the
text:
(set-face-attribute 'line-number nil
:inherit '(fixed-pitch default))
This bug report was last modified 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.