[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 11:21:52 +0000 |
User-agent: |
Alpine 2.22 (NEB 394 2020-01-19) |
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.
tamil-no-font.png
Description: PNG image
tamil-unifont.png
Description: PNG image
tamil-good-font.png
Description: PNG image
- Re: Suggest installing more fonts?, (continued)
Re: Suggest installing more fonts?, Gregory Heytings, 2020/10/16
- Re: Suggest installing more fonts?, Stefan Monnier, 2020/10/16
- Re: Suggest installing more fonts?, Gregory Heytings, 2020/10/16
- Re: Suggest installing more fonts?, Stefan Monnier, 2020/10/16
- Re: Suggest installing more fonts?, Gregory Heytings, 2020/10/16
- Re: Suggest installing more fonts?, Eli Zaretskii, 2020/10/17
- Re: Suggest installing more fonts?,
Gregory Heytings <=
- Re: Suggest installing more fonts?, Eli Zaretskii, 2020/10/17
- Re: Suggest installing more fonts?, Gregory Heytings, 2020/10/17
- Re: Suggest installing more fonts?, Eli Zaretskii, 2020/10/17
- Re: Suggest installing more fonts?, Gregory Heytings, 2020/10/17
- Re: Suggest installing more fonts?, Eli Zaretskii, 2020/10/17
- Re: Suggest installing more fonts?, Gregory Heytings, 2020/10/17
- Re: Suggest installing more fonts?, Eli Zaretskii, 2020/10/17
- Re: Suggest installing more fonts?, Gregory Heytings, 2020/10/17
- Re: Suggest installing more fonts?, Eli Zaretskii, 2020/10/17
- Re: Suggest installing more fonts?, Eli Zaretskii, 2020/10/17