ui/pretty-code: Added support for PragmataPro font

This commit is contained in:
Aidan Gilmore
2018-07-07 17:55:26 -04:00
parent ee91748613
commit b8179ca236
4 changed files with 223 additions and 13 deletions

View File

@ -112,18 +112,6 @@
("~~>" . #Xe169)
("%%" . #Xe16a)))
(defun +pretty-code--correct-symbol-bounds (ligature-alist)
"Prepend non-breaking spaces to a ligature.
This way `compose-region' (called by `prettify-symbols-mode') will use the
correct width of the symbols instead of the width measured by `char-width'."
(let ((len (length (car ligature-alist)))
(acc (list (cdr ligature-alist))))
(while (> len 1)
(setq acc (cons #X00a0 (cons '(Br . Bl) acc))
len (1- len)))
(cons (car ligature-alist) acc)))
(defun +pretty-code|setup-fira-ligatures ()
(set-fontset-font t '(#Xe100 . #Xe16f) +pretty-code-fira-code-font-name)
(setq-default prettify-symbols-alist