From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Display of decomposed characters
Date: Sun, 24 Jan 2021 21:48:07 +0200 [thread overview]
Message-ID: <831rea3ymg.fsf@gnu.org> (raw)
In-Reply-To: <CAArVCkTn6O=K4zW8=shnniFVricUNxDkq4pauRZEexZTL0M-sw@mail.gmail.com> (message from Philipp Stephani on Sun, 24 Jan 2021 19:58:18 +0100)
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sun, 24 Jan 2021 19:58:18 +0100
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
>
> > If the default font supports the diaeresis, that will happen
> > automatically. If not, then simply don't choose the default font that
> > doesn't support accents.
>
> The font will always support the composite variant (because it's part
> of Latin-1).
That is only relevant if Emacs decides to compose the characters.
Then, and only then, will it ask the text-shaping engine to produce
glyphs for the base character and the accent together, and then the
font could provide a single precomposed glyph for them.
> I guess fonts assume that applications will first try to normalize
> strings to avoid issues like this?
Normalizing strings before you know whether the font has the
precomposed glyphs makes no sense.
What the text-shaping folks tell us is that we should pass _all_ the
text through the text shaper, then the shaper will DTRT in every
case. But this would mean a thorough redesign and reimplementation of
how we do that in Emacs, and that is not easy if we want to keep the
current flexibility and customizability (which is why the character
composition code calls out to Lisp, and that makes sending all the
text that way tool expensive to be practical).
> Does it ever make sense to pick different fonts for a base character
> and its combining characters?
If the default font doesn't support the combining accent, what else
can you do? Most fonts don't have precomposed glyphs for every
arbitrary sequence of base character followed by several combining
accents. So sometimes you will have to compose the accents "by hand",
and that is not really possible if they come from different fonts.
> Wouldn't that fundamentally prevent using combining characters? IIUC
> text rendering engines should be able to pick the right glyph if
> that didn't happen (assuming they can perform Unicode
> normalization).
Unicode normalization is only tangentially relevant here.
next prev parent reply other threads:[~2021-01-24 19:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-23 10:05 Display of decomposed characters Philipp Stephani
2020-12-23 13:00 ` Janusz S. Bień
2020-12-23 15:44 ` Eli Zaretskii
2020-12-25 17:14 ` Philipp Stephani
2020-12-25 19:01 ` Eli Zaretskii
2021-01-24 18:58 ` Philipp Stephani
2021-01-24 19:48 ` Eli Zaretskii [this message]
2021-01-24 19:57 ` Eli Zaretskii
2021-02-28 18:10 ` Philipp
2021-02-28 18:42 ` Eli Zaretskii
2021-03-18 14:16 ` Philipp
2021-03-18 14:37 ` Philipp
2021-03-18 15:01 ` Eli Zaretskii
2021-03-19 16:37 ` Philipp
2021-03-19 16:44 ` Eli Zaretskii
2021-03-21 11:43 ` Philipp
2021-03-21 12:10 ` 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=831rea3ymg.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.
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).