feat: support arabic, flycheck font improvment

This commit is contained in:
Flinner 2022-03-05 20:28:10 +03:00
parent c799237a28
commit 6e2ed58382
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
1 changed files with 15 additions and 2 deletions

View File

@ -105,6 +105,7 @@ Better Scrolling
#+begin_src emacs-lisp #+begin_src emacs-lisp
(setq my/ui/monofont "Fira Code") (setq my/ui/monofont "Fira Code")
(setq my/ui/varfont "Noto Serif") (setq my/ui/varfont "Noto Serif")
(setq my/ui/arabicfont "Noto Kofi Arabic")
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -115,6 +116,8 @@ Better Scrolling
(set-face-attribute 'Info-quoted nil :font my/ui/monofont :height 90) (set-face-attribute 'Info-quoted nil :font my/ui/monofont :height 90)
#+end_src #+end_src
emacs-client frames don't adhire to the font for some reason, need to
run this hook:
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun my/ui/font-check () (defun my/ui/font-check ()
"Do font check, then remove self from `focus-in-hook'; need to run this just once." "Do font check, then remove self from `focus-in-hook'; need to run this just once."
@ -123,10 +126,17 @@ Better Scrolling
(set-face-attribute 'variable-pitch nil :font my/ui/varfont :height 90) (set-face-attribute 'variable-pitch nil :font my/ui/varfont :height 90)
;; Info has a horrible mono font ;; Info has a horrible mono font
(set-face-attribute 'Info-quoted nil :font my/ui/monofont :height 90) (set-face-attribute 'Info-quoted nil :font my/ui/monofont :height 90)
;; Arabic
(when window-system (set-fontset-font "fontset-default" '(#x600 . #x6ff) my/ui/arabicfont))
(remove-hook 'focus-in-hook #'my/ui/font-check)) (remove-hook 'focus-in-hook #'my/ui/font-check))
(add-hook 'focus-in-hook #'my/ui/font-check) (add-hook 'focus-in-hook #'my/ui/font-check)
#+end_src #+end_src
Arabic fonts :)
#+begin_src emacs-lisp
(when window-system (set-fontset-font "fontset-default" '(#x600 . #x6ff) my/ui/arabicfont))
#+end_src
** Theme ** Theme
Run =M-x= all-the-icons-install-fonts for the first time! Run =M-x= all-the-icons-install-fonts for the first time!
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -667,7 +677,7 @@ Ivy Rich for having =M-x= description and keybinds
:init (ivy-rich-mode 1)) :init (ivy-rich-mode 1))
#+end_src #+end_src
Ivy floating Ivy floating
#+begin_src emacs-lisp :tangle no #+begin_src emacs-lisp
(use-package ivy-posframe (use-package ivy-posframe
:after ivy :after ivy
:diminish :diminish
@ -1334,7 +1344,10 @@ Lsp UI
*** Flycheck *** Flycheck
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package flycheck :ensure) (use-package flycheck :ensure
:custom-face (flycheck-warning ((t (:underline (:color "#fabd2f" :style line :position line)))))
(flycheck-error ((t (:underline (:color "#fb4934" :style line :position line)))))
(flycheck-info ((t (:underline (:color "#83a598" :style line :position line))))))
#+end_src #+end_src
*** Origami Mode (Folding) *** Origami Mode (Folding)