emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggest installing more fonts?


From: Eli Zaretskii
Subject: Re: Suggest installing more fonts?
Date: Sat, 17 Oct 2020 17:08:00 +0300

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: ghe@sdf.org,  larsi@gnus.org,  emacs-devel@gnu.org
> Date: Sat, 17 Oct 2020 09:49:09 -0400
> 
> > Emacs already knows not to search the available fonts for a character
> > that it already tried to display and failed to find a suitable font.
> > We should probably reuse the information which says a character
> > doesn't have a font for finding such characters and marking them.
> 
> I assumed that Emacs knows it's choosing "tofu" for any particular
> glyph, regardless if that's the result of a long search or the reuse of
> some previous search.

The glyph information (assuming you mean 'struct glyph') is ephemeral,
and is not recorded between redisplay cycles.  It stays stored in the
"current" glyph matrix, but Emacs almost never consults that for
anything except comparison with "desired" matrix, because the current
matrix can easily become outdated.

> If it doesn't (e.g. it just reuses "the same glyph as last time this
> char was used with this face"), then indeed it might be a bit more
> tricky, but I'm sure it can be made acceptably cheap (both in terms of
> memory&CPU resources and in terms of code complexity).

AFAIR, this is indeed based on face information (and the fact that
there's no font is recorded in the face struct), but these faces
aren't exposed to Lisp, they are created and used internally.  Still,
the information should be reachable, I think.



reply via email to

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