* Question: How to make Emacs aware of new fonts without restarting it?
@ 2023-10-25 0:32 Rodrigo Morales
2023-10-25 2:38 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Morales @ 2023-10-25 0:32 UTC (permalink / raw)
To: uzibalqa via Users list for the GNU Emacs text editor
I frequently use Emacs as a font previewer: Given a character, I
display it in all the fonts that contain a glyph for that Unicode
code. This is the function that I've written for that purpose:
http://web.archive.org/web/20231025002303/http://0x0.st/HJ7a.el.txt
Here's what the result looks like:
http://web.archive.org/web/20231025002525/http://0x0.st/HJ7u.png
Sometimes I download fonts from the Internet and run =fc-cache -f
-v=. After I run =fc-cache -f -v= and the fonts are available at
=fc-list=, my web browser is able to display the characters using the
glyphs from the new font. However, Emacs doesn't do that even when I
use =propertize= and set =:family= to the family name of the new
font. Only when I restart Emacs, Emacs is able to display the glyphs
from the new font.
My question is: How to make Emacs load the glyphs from fonts that have
been recently installed without having to restart Emacs?
I've tried calling =clear-font-cache=, but it doesn't seem to cause
any favourable behavior.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question: How to make Emacs aware of new fonts without restarting it?
2023-10-25 0:32 Question: How to make Emacs aware of new fonts without restarting it? Rodrigo Morales
@ 2023-10-25 2:38 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2023-10-25 2:38 UTC (permalink / raw)
To: help-gnu-emacs
> From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
> Date: Wed, 25 Oct 2023 00:32:10 +0000
>
> I frequently use Emacs as a font previewer: Given a character, I
> display it in all the fonts that contain a glyph for that Unicode
> code. This is the function that I've written for that purpose:
> http://web.archive.org/web/20231025002303/http://0x0.st/HJ7a.el.txt
> Here's what the result looks like:
> http://web.archive.org/web/20231025002525/http://0x0.st/HJ7u.png
>
> Sometimes I download fonts from the Internet and run =fc-cache -f
> -v=. After I run =fc-cache -f -v= and the fonts are available at
> =fc-list=, my web browser is able to display the characters using the
> glyphs from the new font. However, Emacs doesn't do that even when I
> use =propertize= and set =:family= to the family name of the new
> font. Only when I restart Emacs, Emacs is able to display the glyphs
> from the new font.
>
> My question is: How to make Emacs load the glyphs from fonts that have
> been recently installed without having to restart Emacs?
>
> I've tried calling =clear-font-cache=, but it doesn't seem to cause
> any favourable behavior.
Try also calling clear-composition-cache.
But in general, this use case is not well supported by Emacs.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-25 2:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 0:32 Question: How to make Emacs aware of new fonts without restarting it? Rodrigo Morales
2023-10-25 2:38 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).