From ccc0db6745bb57b64e91366ce318baa66cd51c98 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 1 Dec 2021 17:45:05 -0800 Subject: [PATCH] [oni-gui] Replace special characters with character codes This is faster on systems where the right fonts haven't been installed. --- oni-gui.el | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/oni-gui.el b/oni-gui.el index fc9d1b6..3e08be1 100644 --- a/oni-gui.el +++ b/oni-gui.el @@ -32,8 +32,8 @@ (add-to-list 'default-frame-alist '(font . "Fantasque Sans Mono-15")) (add-to-list 'default-frame-alist '(internal-border-width . 15)) -(defconst oni-gui-isearch-icon ?) -(defconst oni-gui-arev-icon ?) +(defconst oni-gui-isearch-icon #xf002) +(defconst oni-gui-arev-icon #xf1b8) (defun oni-gui-setup-faces (frame) "Setup faces for FRAME." @@ -45,28 +45,28 @@ If FRAME is nil, they’re set for the current frame." (let ((font-awesome "Font Awesome 5 Free Solid-12")) (set-fontset-font t oni-gui-isearch-icon font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame) + (set-fontset-font t #xf026 font-awesome frame) + (set-fontset-font t #xf027 font-awesome frame) + (set-fontset-font t #xf028 font-awesome frame) + (set-fontset-font t #xf240 font-awesome frame) + (set-fontset-font t #xf241 font-awesome frame) + (set-fontset-font t #xf242 font-awesome frame) + (set-fontset-font t #xf243 font-awesome frame) + (set-fontset-font t #xf244 font-awesome frame) + (set-fontset-font t #xf2c9 font-awesome frame) + (set-fontset-font t #xf6a9 font-awesome frame) + (set-fontset-font t #xf769 font-awesome frame) + (set-fontset-font t #xf76b font-awesome frame) (set-fontset-font t oni-gui-arev-icon font-awesome frame)) (let ((font-awesome "Font Awesome 5 Free Regular-12")) - (set-fontset-font t ? font-awesome frame) - (set-fontset-font t ? font-awesome frame)) + (set-fontset-font t #xf0c8 font-awesome frame) + (set-fontset-font t #xf14a font-awesome frame)) (let ((dejavu-sans-mono "DejaVu Sans Mono-12")) - (set-fontset-font t ?◉ dejavu-sans-mono frame) - (set-fontset-font t ?○ dejavu-sans-mono frame) - (set-fontset-font t ?✸ dejavu-sans-mono frame) - (set-fontset-font t ?✿ dejavu-sans-mono frame) - (set-fontset-font t ?✓ dejavu-sans-mono frame))) + (set-fontset-font t #x25c9 dejavu-sans-mono frame) + (set-fontset-font t #x25cb dejavu-sans-mono frame) + (set-fontset-font t #x2738 dejavu-sans-mono frame) + (set-fontset-font t #x273f dejavu-sans-mono frame) + (set-fontset-font t #x2713 dejavu-sans-mono frame))) ;; Thanks to the article at ;; https://andreyorst.gitlab.io/posts/2020-07-21-programming-ligatures-in-emacs/