help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question: How to make Emacs aware of new fonts without restarting it


From: Eli Zaretskii
Subject: Re: Question: How to make Emacs aware of new fonts without restarting it?
Date: Wed, 25 Oct 2023 05:38:28 +0300

> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]