unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gregory Heytings <ghe@sdf.org>
Cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Suggest installing more fonts?
Date: Sat, 17 Oct 2020 19:30:51 +0300	[thread overview]
Message-ID: <83wnzostl0.fsf@gnu.org> (raw)
In-Reply-To: <alpine.NEB.2.22.394.2010171717400453.24345@sdf.lonestar.org> (message from Gregory Heytings on Sat, 17 Oct 2020 16:09:09 +0000)

> Date: Sat, 17 Oct 2020 16:09:09 +0000
> From: Gregory Heytings <ghe@sdf.org>
> cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
> 
> > 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.

Nonetheless, it's there.

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

I don't understand this proposal.  Are you saying Emacs can already
use a font that is not installed?  If so, can you tell how to do that?

The way Emacs uses fonts is by using various system libraries, such as
Fontconfig, to find fonts that match certain criteria (script,
encoding, character codepoint, size, slant, etc.).  How do you propose
to do that if, for example, Fontconfig knows nothing about a font?

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

This actually means that Unifont is more "in Emacs" than I thought. ;-)

Anyway, did you check the coverage of Hebrew by DejaVu Sans? does it
cover Hebrew?  In any case, Emacs uses Fontconfig to tell which fonts
cover what characters, so I'm guessing the answer is in what
Fontconfig thinks.  (Of course, this is a separate issue, and I'm not
sure we should discuss it in this thread.)

> 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;
>    }

We had already such a patch submitted, but not installed for some
reason I cannot understand, and it was just recently mentioned on
bug-gnu-emacs (together with a few more places where such a test is
needed).



  reply	other threads:[~2020-10-17 16:30 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 10:54 Suggest installing more fonts? Lars Ingebrigtsen
2020-10-16 11:07 ` Eli Zaretskii
2020-10-16 11:30   ` Gregory Heytings via Emacs development discussions.
2020-10-16 12:50     ` Eli Zaretskii
2020-10-16 12:59       ` Gregory Heytings via Emacs development discussions.
2020-10-16 13:13         ` Eli Zaretskii
2020-10-16 14:38           ` Gregory Heytings via Emacs development discussions.
2020-10-16 15:48             ` Eli Zaretskii
2020-10-16 16:09               ` Gregory Heytings via Emacs development discussions.
2020-10-16 18:48                 ` Eli Zaretskii
2020-10-16 19:40                   ` Stefan Monnier
2020-10-17  6:57                     ` Eli Zaretskii
2020-10-17 13:49                       ` Stefan Monnier
2020-10-17 14:08                         ` Eli Zaretskii
2020-10-17 15:04                           ` Stefan Monnier
2020-10-17 15:18                             ` Eli Zaretskii
2020-10-16 13:24     ` Lars Ingebrigtsen
2020-10-16 14:08       ` Gregory Heytings via Emacs development discussions.
2020-10-16 15:34         ` Eli Zaretskii
2020-10-16 15:51           ` Gregory Heytings via Emacs development discussions.
2020-10-16 13:24   ` Lars Ingebrigtsen
2020-10-16 13:30     ` Rudolf Schlatte
2020-10-17  6:14       ` Lars Ingebrigtsen
2020-10-16 14:41     ` Eli Zaretskii
2020-10-17  6:23       ` Lars Ingebrigtsen
2020-10-17  8:55         ` Eli Zaretskii
2020-10-18  8:03           ` Lars Ingebrigtsen
2020-10-18 15:21             ` Eli Zaretskii
2020-10-19  8:31               ` Lars Ingebrigtsen
2020-10-19 14:50                 ` Eli Zaretskii
2020-10-20 10:28                   ` Lars Ingebrigtsen
2020-10-20 14:31                     ` Eli Zaretskii
2020-10-21 10:46                       ` Lars Ingebrigtsen
2020-10-21 11:31                         ` Michael Albinus
2020-10-21 11:58                           ` Stefan Kangas
2020-10-21 14:54                           ` Eli Zaretskii
2020-10-21 16:03                             ` tofu-help-mode (was: Suggest installing more fonts?) Stefan Monnier
2020-10-22 12:07                               ` tofu-help-mode Lars Ingebrigtsen
2020-10-22 15:21                                 ` tofu-help-mode Stefan Monnier
2020-10-23 10:46                                   ` tofu-help-mode Lars Ingebrigtsen
2020-10-21 17:46                             ` Suggest installing more fonts? Michael Albinus
2020-10-21 18:14                               ` Eli Zaretskii
2020-10-22  7:27                                 ` Michael Albinus
2020-10-22 13:09                                   ` Eli Zaretskii
2020-10-23 16:53                                     ` Michael Albinus
2020-10-23 18:13                                       ` Eli Zaretskii
2020-10-25 11:47                                         ` Michael Albinus
2020-10-25 15:19                                           ` Eli Zaretskii
2020-10-21 17:25                           ` Juri Linkov
2020-10-21 11:59                         ` Basil L. Contovounesios
2020-10-21 12:05                           ` Lars Ingebrigtsen
2020-10-21 12:31                             ` Stephen Berman
2020-10-21 14:47                         ` Eli Zaretskii
2020-10-21 20:19                           ` Rasmus
2020-10-22  2:34                             ` Eli Zaretskii
2020-10-22 12:34                               ` Rasmus
2020-10-22 13:35                                 ` Eli Zaretskii
2020-10-21 20:19                           ` Rasmus
2020-10-22 11:32                           ` Lars Ingebrigtsen
2020-10-22 12:02                             ` Gregory Heytings via Emacs development discussions.
2020-10-22 12:08                               ` Lars Ingebrigtsen
2020-10-22 12:29                                 ` Gregory Heytings via Emacs development discussions.
2020-10-22 13:31                                 ` Eli Zaretskii
2020-10-23  3:49                                   ` Richard Stallman
2020-10-23  6:59                                     ` Eli Zaretskii
2020-10-23  8:28                                       ` Andreas Schwab
2020-10-23 11:01                                         ` Eli Zaretskii
2020-10-23 15:50                                           ` Andreas Schwab
2020-10-23 16:38                                             ` Stefan Monnier
2020-10-23 18:03                                             ` Eli Zaretskii
2020-10-23 18:43                                               ` Robert Pluim
2020-10-23 19:31                                                 ` Eli Zaretskii
2020-10-24  9:35                                                   ` Robert Pluim
2020-10-23 10:45                                   ` Lars Ingebrigtsen
2020-10-23 11:07                                     ` Eli Zaretskii
2020-10-23 14:59                                       ` Stefan Monnier
2020-10-23 17:56                                         ` Eli Zaretskii
2020-10-23 18:13                                           ` Stefan Monnier
2020-10-23 18:23                                             ` Eli Zaretskii
2020-10-23 18:36                                               ` Stefan Monnier
2020-10-23 18:18                                           ` Gregory Heytings via Emacs development discussions.
2020-10-22 13:16                             ` Eli Zaretskii
2020-10-22 13:40                               ` Gregory Heytings via Emacs development discussions.
2020-10-22 13:52                                 ` Eli Zaretskii
2020-10-22 14:20                                   ` Gregory Heytings via Emacs development discussions.
2020-10-22 15:50                                     ` Eli Zaretskii
2020-10-16 18:48 ` Stefan Monnier
2020-10-16 19:13   ` Eli Zaretskii
2020-10-16 19:37     ` Stefan Monnier
2020-10-17  6:37       ` Eli Zaretskii
2020-10-17 13:44         ` Stefan Monnier
2020-10-16 19:42   ` Gregory Heytings via Emacs development discussions.
2020-10-16 19:49     ` Stefan Monnier
2020-10-16 22:14       ` Gregory Heytings via Emacs development discussions.
2020-10-16 22:35         ` Stefan Monnier
2020-10-16 23:02           ` Gregory Heytings via Emacs development discussions.
2020-10-17  7:46             ` Eli Zaretskii
2020-10-17 11:21               ` Gregory Heytings via Emacs development discussions.
2020-10-17 12:13                 ` Eli Zaretskii
2020-10-17 13:09                   ` Gregory Heytings via Emacs development discussions.
2020-10-17 13:33                     ` Eli Zaretskii
2020-10-17 16:09                       ` Gregory Heytings via Emacs development discussions.
2020-10-17 16:30                         ` Eli Zaretskii [this message]
2020-10-17 17:37                           ` Gregory Heytings via Emacs development discussions.
2020-10-17 17:58                             ` Eli Zaretskii
2020-10-17 18:36                               ` Gregory Heytings via Emacs development discussions.
2020-10-17 18:50                                 ` Eli Zaretskii
2020-10-17 18:56                                   ` Eli Zaretskii
2020-10-17 19:18                                   ` Gregory Heytings via Emacs development discussions.
2020-10-17 19:33                                     ` Eli Zaretskii
2020-10-18  8:06                           ` Lars Ingebrigtsen
2020-10-18 14:55                             ` Eli Zaretskii
2020-10-17 17:30                 ` Drew Adams
2020-10-18  4:12             ` Richard Stallman
2020-10-18 14:45               ` Eli Zaretskii
2020-10-20 22:46       ` Stephen Leake
2020-10-17  6:31   ` Lars Ingebrigtsen
2020-10-17  9:08     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83wnzostl0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ghe@sdf.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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