-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support tab-bar
and tab-bar-tab*
faces separately
#7
Comments
Hello Adam! Yes, sure! Can you list all the faces you are interested in? We will take it from there. I guess this extends to the tab-line as well? |
I don't know if I have a list of faces per se. But if it helps, here's the code I currently use to customize these faces when changing theme: (progn
;; NOTE: If Fontaine gains support for the :width attribute, this
;; code would likely be unnecessary. See
;; <https://github.com/protesilaos/fontaine/issues/6> and
;; <https://github.com/protesilaos/fontaine/issues/7>.
(defun ap/modify-faces (&rest faces)
(pcase-dolist (`(,face . ,spec) faces)
(map-do (lambda (attribute value)
(set-face-attribute face nil attribute value))
spec)))
(defun ap/modify-tab-bar-faces (&rest _)
(ap/modify-faces
'(tab-bar :family nil :inherit (variable-pitch))
'(tab-bar-tab :family "NK57 Monospace" :width condensed :weight bold
:inherit (tab-bar))
'(tab-bar-tab-inactive :inherit (tab-bar-tab))))
(defun ap/modify-tab-line-faces (&rest _)
(ap/modify-faces
'(tab-line-tab-special :slant italic)))
;; The tab-bar tabs should be "NK57 Monospace" condensed, but
;; the rest of the tab-bar line should be variable-pitch to
;; save space.
(add-hook 'enable-theme-functions #'ap/modify-tab-bar-faces)
(add-hook 'enable-theme-functions #'ap/modify-tab-line-faces)
(ap/modify-tab-bar-faces)
(ap/modify-tab-line-faces)) Please let me know if you have any other thoughts or questions. |
Okay, I will look into this. I am not using either of those bars so I have to test that we do not get into some awkward scenario by using different fonts. |
Hi again Prot,
As I mentioned in #6, the new support for the
tab-bar
face is helpful, but it precludes the user from applying a different face totab-bar-tab*
faces (e.g. to have tabs themselves in one font and other, non-tab text in the tab bar in another).Could the
tab-bar
andtab-bar-tab*
faces be handled separately in the next version of Fontaine? i.e. I'd suggest thattab-bar-tab
inherit fromtab-bar
by default, and thattab-bar-tab*
faces inherit fromtab-bar-tab
, but that they be specified in a way so thattab-bar
could be set to a different font thantab-bar-tab
if desired.Thanks for your work on Fontaine.
The text was updated successfully, but these errors were encountered: