From fcc16e8f9802884ee4663aa1547663f7ebc7ccb0 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 4 Jan 2021 14:13:07 +0100 Subject: [PATCH] [Emacs] Fix org faces Between Emacs 28.0.50.145785 and Emacs 28.0.50.146000, a commit broke my face config, and inheriting from `fixed-pitch' no longer made my faces fixed-pitched. This commit therefore sets directly the font of the faces than need to be fixed-pitched instead of relying on the `fixed-pitch' face. --- .spacemacs | 1 + org/config/emacs.org | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.spacemacs b/.spacemacs index df31c8f..26efcef 100644 --- a/.spacemacs +++ b/.spacemacs @@ -182,6 +182,7 @@ This function is called at the very end of Spacemacs initialization." '(org-block-begin-line ((t (:inherit fixed-pitch :height 0.8)))) '(org-checkbox ((t (:inherit (org-todo shadow fixed-pitch))))) '(org-code ((t (:inherit (shadow fixed-pitch))))) + '(org-date ((t (:inherit fixed-pitch :height 0.8 :foreground "#ebcb8b")))) '(org-document-info ((t (:foreground "#d08770")))) '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch))))) '(org-document-title ((t (:font "Charis SIL" :height 1.0 :inherit default :weight bold :foreground "#bf616a" :height 2.0 :italic t)))) diff --git a/org/config/emacs.org b/org/config/emacs.org index 924c605..259ba8a 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -2199,9 +2199,9 @@ In order to make org-mode even sexier, let’s enable ~variable-pitch-mode~ for Fonts will play an important part in this, but so will colors and font size. The following code is largely based on the one found [[https://zzamboni.org/post/beautifying-org-mode-in-emacs/][on this blog post]] and [[https://lepisma.xyz/2017/10/28/ricing-org-mode/][this one]]. #+NAME: beautiful-org-faces #+BEGIN_SRC emacs-lisp - (let* ((font `(:font "Charis SIL" :height 1.0)) - (head `(:inherit default :weight bold)) - (fixed `(:inherit fixed-pitch :height 0.8))) + (let* ((font `(:font "Charis SIL" :height 1.0)) + (head `(:inherit default :weight bold)) + (fixed `(:font "Cascadia Code" :height 0.8))) (custom-theme-set-faces 'user `(org-level-1 ((t (,@font ,@head :foreground ,phundrak/nord15 :height 1.75)))) @@ -2224,12 +2224,12 @@ Fonts will play an important part in this, but so will colors and font size. The `(org-drawer ((t (,@fixed :foreground ,phundrak/nord10))) t) `(org-table ((t (,@fixed :foreground ,phundrak/nord14))) t) `(org-date ((t (,@fixed :foreground ,phundrak/nord13))) t) - '(org-code ((t (:inherit (shadow fixed-pitch))))) - '(org-verbatim ((t (:inherit (shadow fixed-pitch))))) - '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch))))) - '(org-tag ((t (:inherit (shadow fixed-pitch) :weight bold)))) - '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.8)))) - `(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch) :height 0.8 :foreground ,phundrak/nord15)))) + '(org-code ((t (:inherit (shadow fixed-pitch) ,@fixed)))) + '(org-verbatim ((t (:inherit (shadow fixed-pitch) ,@fixed)))) + '(org-document-info-keyword ((t (:inherit (shadow fixed-pitch) ,@fixed)))) + '(org-tag ((t (:inherit (shadow fixed-pitch) ,@fixed :weight bold)))) + '(org-meta-line ((t (:inherit (font-lock-comment-face fixed-pitch) ,@fixed :height 0.8)))) + `(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch) ,@fixed :height 0.8 :foreground ,phundrak/nord15)))) '(org-checkbox ((t (:inherit (org-todo shadow fixed-pitch))))) `(org-document-info ((t (:foreground ,phundrak/nord12)))) `(org-link ((t (:foreground ,phundrak/nord8 :underline t))))))