all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gregory Heytings via "Emacs development discussions." <emacs-devel@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Suggest installing more fonts?
Date: Sat, 17 Oct 2020 11:21:52 +0000	[thread overview]
Message-ID: <alpine.NEB.2.22.394.2010171009140453.28140@sdf.lonestar.org> (raw)
In-Reply-To: <83zh4lthv4.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 4031 bytes --]


>>> I know.  I was just pointing out that there are several problems 
>>> (missing fonts is one of them, but not the only one), so before trying 
>>> to solve "the problem", we should be clear about which one it is and 
>>> try and figure out whether it's indeed the most common.
>>
>> A user has (usually) no idea of these "several problems", and knows 
>> even less how to fix them.  For such users the problem is simply "Emacs 
>> displays gibberish".  That is "the problem" IMO.  Everything else are 
>> technicalities that very few know/understand/have the patience to deal 
>> with.
>>
>> So IMO for these users it would be much better to display characters 
>> with a low-resolution font, together with a warning (and perhaps a 
>> pointer to a short guide) (as a help-echo and/or in the echo area), 
>> instead of a tofu.
>
> Then the problem will become "Emacs uses an ugly font where other apps 
> don't", and we are none the wiser.
>

_All_ apps have that problem, it is _not_ an Emacs-specific problem.  I 
provided two examples with apps that have a lot more available manpower 
than Emacs (Chromium and VS Code) in which that problem also exists. 
What _all_ apps do in that case is to display a tofu.

>
> IMO, we should try fixing whatever problems are there (and AFAIU there's 
> more than one) without using ugly fonts.  For example, problems with 
> displaying Emoji are due to some missing infrastructure (see a separate 
> discussion about that), and once we add that, the result will be much 
> better than anything you could get with Unifont.
>

It's a very complex problem, which is why it exists in all apps.  I don't 
know a single app in which that problem does not exist.

FWIW, here is my solution for Emojis (on Debian, after installing the 
fonts-noto-color-emoji package):

fc-match --format='%{charset}\n' NotoColorEmoji | tr ' ' '\n' | grep '^[^-][^-][^-][^-]' | grep -v '^200d$' | sed 's/^/#x/;s/-/ . #x/;s/^\(#[^#]*#[^#]*\)/!(\1)/;s/^\(.*\)$/(set-fontset-font "fontset-default" \1 "NotoColorEmoji")/' | tr '!' "'"

This creates 154 calls to "set-fontset-font", and as a result 
https://unicode.org/Public/UNIDATA/emoji/emoji-data.txt is displayed 
nicely by Emacs.  I'm sure you will tell me that you don't like that 
solution ;-)  But I doubt it is possible to do really better, because 
Emojis are scattered across the whole Unicode code space.

>
> IOW, using Unifont is simply a kind of admission of defeat: we don't 
> really know why Emacs doesn't find a good font, so we take the easy path 
> of providing _some_ font that will always work, albeit show ugly glyphs. 
> I see no need to declare defeat, as we have facilities in Emacs to solve 
> these problems in a better way, once we understand them.  We should 
> therefore try to understand the problems better, and once understood, 
> solve them properly.
>

The meaning of my proposal was, in fact, the exact opposite of an 
admission of defeat, it was to make Emacs better in that respect than all 
other apps.  Displaying a tofu is an admission of defeat, and it's what 
all other apps do.  They say to the user: "I don't know how to display 
that character, so I just give up without giving you any clue." 
Displaying a bitmap glyph with a warning message is doing something 
better: the users see the characters and get an indication on what they 
could do to see them better.

Another example: I have no fonts to display tamil characters on my 
computer.  Which means every app, including Emacs, displays tamil 
characters as a sequence of tofus.  I attach three pictures of the same 
short tamil text displayed by Emacs, one with its current behavior 
(tamil-no-font.png), one if it used Unifont as a fallback 
(tamil-unifont.png), and one if a proper tamil font (the Debian package 
fonts-lohit-taml) is installed (tamil-good-font.png).  I do agree (of 
course) that tamil-good-font.png is better than tamil-unifont.png, but I 
really can't understand how tamil-no-font.png could be considered better 
than tamil-unifont.png.

[-- Attachment #2: Type: image/png, Size: 1618 bytes --]

[-- Attachment #3: Type: image/png, Size: 690 bytes --]

[-- Attachment #4: Type: image/png, Size: 1866 bytes --]

  reply	other threads:[~2020-10-17 11:21 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. [this message]
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
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

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

  git send-email \
    --in-reply-to=alpine.NEB.2.22.394.2010171009140453.28140@sdf.lonestar.org \
    --to=emacs-devel@gnu.org \
    --cc=eliz@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.