Install show-font in an attempt to fix font errors

These occur on theme change when theme-buffet kicks in
This commit is contained in:
Vedang Manerikar 2024-11-17 08:14:22 +05:30
parent e39ad32071
commit f4a006118d
2 changed files with 73 additions and 7 deletions

View file

@ -735,7 +735,7 @@ Another section defines some complementary functionality
:fixed-pitch-width nil :fixed-pitch-width nil
:fixed-pitch-height 1.0 :fixed-pitch-height 1.0
:fixed-pitch-serif-family nil :fixed-pitch-serif-family "Iosevka"
:fixed-pitch-serif-weight nil :fixed-pitch-serif-weight nil
:fixed-pitch-serif-slant nil :fixed-pitch-serif-slant nil
:fixed-pitch-serif-width nil :fixed-pitch-serif-width nil
@ -798,6 +798,52 @@ Another section defines some complementary functionality
:line-spacing nil)))) :line-spacing nil))))
#+end_src #+end_src
** The =unravel-theme.el= section about ~show-font~
:PROPERTIES:
:CUSTOM_ID: h:60a005be-77bd-49f1-a865-78d7cf75bd2a
:END:
#+begin_quote
This is yet another package of mine. It lets you preview a font inside
of Emacs. It does so in three ways:
- Prompt for a font on the system and display it in a buffer.
- List all known fonts in a buffer, with a short preview for each.
- Provide a major mode to preview a font whose file is among the
installed ones.
#+end_quote
Prot is the developer and maintainer of this package.
+ Package name (GNU ELPA): ~show-font~
+ Official manual: <https://protesilaos.com/emacs/show-font>
+ Change log: <https://protesilaos.com/emacs/show-font-changelog>
+ Git repository: <https://github.com/protesilaos/show-font>
To actually set fonts, use the ~fontaine~ package ([[#h:cb41fef0-41a5-4a85-9552-496d96290258][The =unravel-theme.el= section about ~fontaine~]]).
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-theme.el"
;;;; Show Font (preview fonts)
;; Read the manual: <https://protesilaos.com/emacs/show-font>
(use-package show-font
:ensure t
:commands (show-font-select-preview show-font-list)
:config
;; These are the defaults, but I keep them here for easier access.
(setq show-font-pangram 'prot)
(setq show-font-character-sample
"
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789 !@#$¢%^&*~|
`'\"‘’“”.,;: ()[]{}—-_+=<>
()[]{}<>«»‹› 6bB8&0ODdoa 1tiIlL|\/
!ij c¢ 5$Ss 7Z2z 9gqp nmMNNMW uvvwWuuw
x×X .,·°;:¡!¿?`' ÄAÃÀ TODO
"))
#+end_src
** The =unravel-theme.el= section about ~variable-pitch-mode~ and font resizing ** The =unravel-theme.el= section about ~variable-pitch-mode~ and font resizing
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h:60d6aae2-6e4b-402c-b6a8-411fc49a6857 :CUSTOM_ID: h:60d6aae2-6e4b-402c-b6a8-411fc49a6857
@ -810,7 +856,7 @@ The built-in ~variable-pitch-mode~ makes the current buffer use a
proportionately spaced font. In technical terms, it remaps the proportionately spaced font. In technical terms, it remaps the
~default~ face to ~variable-pitch~, so whatever applies to the latter ~default~ face to ~variable-pitch~, so whatever applies to the latter
takes effect over the former. I take care of their respective font takes effect over the former. I take care of their respective font
families in my ~fontaine~ setup ([[#h:cb41fef0-41a5-4a85-9552-496d96290258][The =prot-emacs-theme.el= section about ~fontaine~]]). families in my ~fontaine~ setup ([[#h:cb41fef0-41a5-4a85-9552-496d96290258][The =unravel-theme.el= section about ~fontaine~]]).
I want to activate ~variable-pitch-mode~ in all buffers where I I want to activate ~variable-pitch-mode~ in all buffers where I
normally focus on prose. The exact mode hooks are specified in the normally focus on prose. The exact mode hooks are specified in the
@ -1038,7 +1084,7 @@ process.
(server-start))) (server-start)))
#+end_src #+end_src
** The =prot-emacs-essentials.el= section about ~expreg~ (tree-sitter mark syntactically) ** The =unravel-essentials.el= section about ~expreg~ (tree-sitter mark syntactically)
:PROPERTIES: :PROPERTIES:
:CUSTOM_ID: h:ceb193bf-0de3-4c43-8ab7-6daa50817754 :CUSTOM_ID: h:ceb193bf-0de3-4c43-8ab7-6daa50817754
:END: :END:
@ -1190,7 +1236,7 @@ interpret user input and match candidates accordingly.
- orderless :: This is the only completion style I use which is not - orderless :: This is the only completion style I use which is not
built into Emacs and which I tweak further in a separate section built into Emacs and which I tweak further in a separate section
([[#h:7cc77fd0-8f98-4fc0-80be-48a758fcb6e2][The =prot-emacs-completion.el= for the ~orderless~ completion style]]). ([[#h:7cc77fd0-8f98-4fc0-80be-48a758fcb6e2][The =unravel-completion.el= for the ~orderless~ completion style]]).
It matches patterns out-of-order. Patterns are typically words It matches patterns out-of-order. Patterns are typically words
separated by spaces, though they can also be regular expressions, separated by spaces, though they can also be regular expressions,
and even styles that are the same as the aforementioned ~flex~ and and even styles that are the same as the aforementioned ~flex~ and
@ -1286,7 +1332,7 @@ soon as I type a space after some characters I am using ~orderless~.
#+begin_quote #+begin_quote
The ~orderless~ package by Omar Antolín Camarena provides one of the The ~orderless~ package by Omar Antolín Camarena provides one of the
completion styles that I use ([[#h:14b09958-279e-4069-81e3-5a16c9b69892][The =prot-emacs-completion.el= settings for completion styles]]). completion styles that I use ([[#h:14b09958-279e-4069-81e3-5a16c9b69892][The =unravel-completion.el= settings for completion styles]]).
It is a powerful pattern matching algorithm that parses user input and It is a powerful pattern matching algorithm that parses user input and
interprets it out-of-order, so that =in pa= will cover ~insert-pair~ interprets it out-of-order, so that =in pa= will cover ~insert-pair~
as well as ~package-install~. Components of the search are as well as ~package-install~. Components of the search are
@ -1547,7 +1593,7 @@ where the cursor is. The companion ~corfu-popupinfo-mode~ will show a
secondary documentation popup if we move over a candidate but do not secondary documentation popup if we move over a candidate but do not
do anything with it. do anything with it.
Also see [[#h:567bb00f-1d82-4746-93e5-e0f60721728a][the =prot-emacs-completion.el= settings for dynamic text expansion (~dabbrev~)]]. Also see [[#h:567bb00f-1d82-4746-93e5-e0f60721728a][the =unravel-completion.el= settings for dynamic text expansion (~dabbrev~)]].
#+end_quote #+end_quote
#+begin_src emacs-lisp :tangle "unravel-modules/unravel-completion.el" #+begin_src emacs-lisp :tangle "unravel-modules/unravel-completion.el"

View file

@ -208,7 +208,7 @@
:fixed-pitch-width nil :fixed-pitch-width nil
:fixed-pitch-height 1.0 :fixed-pitch-height 1.0
:fixed-pitch-serif-family nil :fixed-pitch-serif-family "Iosevka"
:fixed-pitch-serif-weight nil :fixed-pitch-serif-weight nil
:fixed-pitch-serif-slant nil :fixed-pitch-serif-slant nil
:fixed-pitch-serif-width nil :fixed-pitch-serif-width nil
@ -270,6 +270,26 @@
:line-spacing nil)))) :line-spacing nil))))
;;;; Show Font (preview fonts)
;; Read the manual: <https://protesilaos.com/emacs/show-font>
(use-package show-font
:ensure t
:commands (show-font-select-preview show-font-list)
:config
;; These are the defaults, but I keep them here for easier access.
(setq show-font-pangram 'prot)
(setq show-font-character-sample
"
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789 !@#$¢%^&*~|
`'\".,;: ()[]{}—-_+=<>
()[]{}<>«» 6bB8&0ODdoa 1tiIlL|\/
!ij c¢ 5$Ss 7Z2z 9gqp nmMNNMW uvvwWuuw
x×X .,·°;:¡!¿?`' ÄAÃÀ TODO
"))
;;;;; `variable-pitch-mode' setup ;;;;; `variable-pitch-mode' setup
(use-package face-remap (use-package face-remap
:ensure nil :ensure nil