From 639f813ab023b62f40fbcc368be7fc8bd6b46a19 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 17 Jun 2021 20:22:41 +0100 Subject: [PATCH] feat(ui): change macOS GUI font from Monaco to Menlo Also force-disable bold font-weights, as they're a bit annoying. --- core/siren-core-macos.el | 2 +- core/siren-core-themes.el | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/core/siren-core-macos.el b/core/siren-core-macos.el index b230a4f..20eeed6 100644 --- a/core/siren-core-macos.el +++ b/core/siren-core-macos.el @@ -22,7 +22,7 @@ ;; When running in GUI mode. (when window-system ;; Set default font - (set-face-attribute 'default nil :family "Monaco" :height 120) + (set-face-attribute 'default nil :family "Menlo" :height 120) ;; Fix the default default-directory value. (if (string= default-directory "/") diff --git a/core/siren-core-themes.el b/core/siren-core-themes.el index 2d1c387..6110dab 100644 --- a/core/siren-core-themes.el +++ b/core/siren-core-themes.el @@ -10,5 +10,19 @@ "Root directory for Emacs Siren custom themes.") (add-to-list 'custom-theme-load-path siren-themes-dir) +;; Globally disable setting face weight to bold. +(defvar siren-set-face-ignore-attributes '(:weight)) +(defadvice set-face-attribute + (before ignore-attributes (face frame &rest args) activate) + (setq args + (apply 'nconc + (mapcar (lambda (i) + (let ((attribute (nth i args)) + (value (nth (1+ i) args))) + (if (not (memq attribute + siren-set-face-ignore-attributes)) + (list attribute value)))) + (number-sequence 0 (1- (length args)) 2))))) + (provide 'siren-core-themes) ;;; siren-core-themes.el ends here