From b0679649301748affbca3072119c4a6755969e2e Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Sat, 19 Oct 2024 13:35:37 -0700 Subject: [PATCH] Trying out a new variable-pitch font MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And fixed up my emoji font: šŸ˜ --- ha-display.org | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ha-display.org b/ha-display.org index 1028304..6ebe55e 100644 --- a/ha-display.org +++ b/ha-display.org @@ -228,7 +228,8 @@ I probably don't need to have such a ranking system, as chances are good I have (or (seq-first (seq-filter (lambda (font) (when (x-list-fonts font) font)) - '("SN Pro" ; https://supernotes.app/open-source/sn-pro + '("Atkinson Hyperlegible" + "SN Pro" ; https://supernotes.app/open-source/sn-pro "Literata" ; Clean, readable with litagures ;; Next best can be downloaded here: ;; https://fontesk.com/xcharter-typeface/ @@ -473,13 +474,14 @@ Display these two symbols as one: #+end_src And turn the prettifier on: + #+begin_src emacs-lisp (global-prettify-symbols-mode 1) #+end_src -In Emacs 28.1, we have better Unicode 14 support. Which means, we need to install [[https://github.com/googlefonts/noto-emoji][Noto Color Emoji]]. My systems, seems to work fine, but Iā€™m leaving this code here in case I have issues, as I might use what Apple supplies when on a Mac (thanks [[http://xahlee.info/emacs/emacs/emacs_list_and_set_font.html][Xah Lee]]): -#+begin_src emacs-lisp - ;; set font for symbols +Also, we need a font for the symbols, and both Apple and Linux supplies different ones: + +#+BEGIN_SRC emacs-lisp (set-fontset-font t 'symbol (cond ((ha-running-on-macos?) @@ -489,19 +491,28 @@ In Emacs 28.1, we have better Unicode 14 support. Which means, we need to instal (cond ((member "Symbola" (font-family-list)) "Symbola"))))) +#+END_SRC + +In Emacs 28.1, we have better Unicode 14 support. Which means, we need to install either [[https://fonts.google.com/noto/specimen/Noto+Emoji][Noto Emoji]] or [[https://github.com/googlefonts/noto-emoji][Noto Color Emoji]]. Since Iā€™m also on Mac, I might use what Apple supplies when on a Mac (thanks [[http://xahlee.info/emacs/emacs/emacs_list_and_set_font.html][Xah Lee]]): + +#+begin_src emacs-lisp ;; set font for emoji (should come after setting symbols) (set-fontset-font t 'emoji (cond ((member "Apple Color Emoji" (font-family-list)) "Apple Color Emoji") - ((member "Noto Color Emoji" (font-family-list)) "Noto Color Emoji") - ((member "Symbola" (font-family-list)) "Symbola"))) + ((member "Noto Color Emoji" (font-family-list)) "Noto Color Emoji") + ((member "Noto Emoji" (font-family-list)) "Noto Emoji") + ((member "Symbola" (font-family-list)) "Symbola"))) #+end_src + Test this out: šŸ˜„ šŸ˜± šŸ˜ø šŸ‘ø šŸ‘½ šŸ™‹ Not use what I'm doing with the [[https://github.com/domtronn/all-the-icons.el][all-the-icons]] package, but the Doom Modeline uses much of this. + #+begin_src emacs-lisp (use-package all-the-icons) #+end_src + *Note:* Install everything with the function, =all-the-icons-install-fonts=. * Ligatures Seems like getting ligatures to work in Emacs has been a Holy Grail. On Mac, I've used special builds that have hacks, but now with Emacs 27 and Harfbuzz, I should be able to get --> to look like it should.