emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggest installing more fonts?


From: Gregory Heytings
Subject: Re: Suggest installing more fonts?
Date: Sat, 17 Oct 2020 16:09:09 +0000
User-agent: Alpine 2.22 (NEB 394 2020-01-19)


About the use cases you are talking about, I haven't seen cases where "Emacs displays tofu where other applications display characters from installed fonts". My experience is that Emacs behaves better than many other applications in this respect (except for the particular case of Emojis).

I invite you to read the various font- and fontset-related bug reports we have, and also relevant posts on Reddit and elsewhere out there.

Alas, I could not find anything with your indications.

The meaning of my proposal was only to include it _in_ Emacs, in short, to use, when it exists, the Unifont glyph in produce_glyphless_glyph() instead of creating a tofu with a hexcode.

As I wrote, this is not easily done, as font installation is a system-wide action, as the font needs to be known by the system-wide utilities and libraries we use for font searching.


Apparently it's not clear, so I'll say one last time that the feature I propose does _not_ require to install Unifont system-wide. It is to include Unifont in Emacs (say in etc/unifont), and to offer it as an additional option for glyphless-char-display, along with hex-code, empty-box, thin-space, and zero-width. The bitmap data would be used to draw the glyph in produce_glyphless_glyph() .

FYI, that feature is not "already in Emacs", as you said: when Unifont is installed, it takes precedence over some (but not all, I'm not sure why) of the better-looking available fonts. One example: DejaVu Sans has hebrew characters, but with Unifont installed hebrew characters are displayed with Unifont.

By the way, while doing various experiments around that question, I found a bug in ftcrfont.c. If a buffer is displayed with a certain font, and that font is removed, Emacs segfaults when it redisplays that buffer. The bug is in ftcrfont_open, on line 237:

ft_face = cairo_ft_scaled_font_lock_face (scaled_font);

This line should be followed by a:

if (!ft_face)
  {
    unblock_input ();
    /* further cleanup? */
    return Qnil;
  }



reply via email to

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