unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Greg A. Woods" <woods@robohack.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: GNU Emacs Bug Reports <53924@debbugs.gnu.org>
Subject: bug#53924: 26.1; fontification sometimes fails for some characters despite available glyphs
Date: Wed, 16 Feb 2022 13:55:01 -0800	[thread overview]
Message-ID: <m1nKSGL-003DIj0@more.local> (raw)
In-Reply-To: <83k0dv32kn.fsf@gnu.org>

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

At Wed, 16 Feb 2022 05:36:24 +0200, Eli Zaretskii <eliz@gnu.org> wrote:
Subject: Re: bug#53924: 26.1; fontification sometimes fails for some characters despite available glyphs
>
> > Date: Tue, 15 Feb 2022 18:32:23 -0800
> > From: "Greg A. Woods" <woods@robohack.ca>
> > CC: GNU Emacs Bug Reports <53924@debbugs.gnu.org>
> >
> > Hopefully this message encodes properly, it should be text/plain, in
> > the ISO10646-1 charset, with BASE64 encoding.
> >
> > Run "emacs -q" in the debugger, switch to the *scratch* buffer and
> > insert the forms below, then:
> >
> > M-x eval-buffer <return>
> >
> > Switch to the new *Font Families* buffer and scroll slowly through it.
> > Depending on how many fonts you have installed, and how, and what kind
> > of resources your system(s) have, this could take quite a long time.
> >
> > If that doesn't trigger a crash try going back to the beginning,
> > increase the text scale with C-u C-x C-+ and scroll through again.
> >
> > This seems to reliably cause the crash for me, at least with the Git
> > master version I have built using the lucid toolkit..
>
> Like I said before: please try to figure out which font causes the
> crashes, and post a recipe with that font alone.  Otherwise, trying to
> reproduce this is a huge waste of time, because the results depend
> critically on the fonts actually installed on the system.

Sorry, I really can't be bothered to waste more of my own time on this
aspect of the problem until I know that you, or someone else, has at
least tried the very simple test I've provided.  It is really very
simple, and it really would be useful if someone other than myself, in
my limited test environment, can try it out to see what happens.  I've
even already identified suspect fonts (e.g. in comments in the code I
supplied), and if you don't have them google will almost instantly tell
you where you can find them to try for yourself.

Any crash is very bad of course, but, the main issue central to this bug
report remains, which is the question of why Emacs chooses to use the
frame's default font for ASCII characters when displaying some fonts but
not others (even simultaneously with both fonts rendered in the same
frame), even when all fonts appear (via other tools) to have all
necessary glyphs for all these same ASCII characters.  The algorithms
for this choice do not seem to be very well documented outside of the
code itself, and the code is extremely convoluted and non-modular.  If
there's something "odd" or otherwise wrong/different with the fonts that
don't display properly, that's fine, I just want to know exactly what
the problem is.  However without knowing even what could be wrong it's
impossible to identify and perhaps fix or otherwise change these
differences using other tools.

My only other available test environment is native macOS with Emacs
using the "nextstep" toolkit.  There it seems Emacs has very a different
and quite opposite "opinion" about ASCII vs. other Unicode characters
(than under X11) -- the macOS native version is happy to show empty
boxes for ASCII characters if the font has none, but it always cobbles
together other Unicode glyphs, e.g. in my sample text, from a variety of
other fonts if the requested font has no glyphs for them.  I have not
seen any crashes in the native macOS environment either.

Anyway this X11 font display issue seems to be central to Emacs' ability
to accurately display things like web pages and other formatted
documents in a more WYSIWYG manner.  It also doesn't make a very good
demo if Emacs can't even show samples of all available fonts in a given
environment.  The crash, which for example might be triggered by an
attempt to use one of the more problematic fonts in displaying a
formatted web page or document, is still secondary to my main issue.

--
					Greg A. Woods <gwoods@acm.org>

Kelowna, BC     +1 250 762-7675           RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>     Avoncote Farms <woods@avoncote.ca>

[-- Attachment #2: OpenPGP Digital Signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2022-02-16 21:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 19:02 bug#53924: 26.1; fontification sometimes fails for some characters despite available glyphs Greg A. Woods
2022-02-10 20:21 ` Eli Zaretskii
2022-02-10 23:34   ` Greg A. Woods
2022-02-11  7:15     ` Eli Zaretskii
2022-02-11 21:56       ` Greg A. Woods
2022-02-13  6:06       ` Greg A. Woods
2022-02-13 11:53         ` Eli Zaretskii
2022-02-15  2:01           ` Greg A. Woods
2022-02-15 14:21             ` Eli Zaretskii
2022-02-15 22:04               ` Greg A. Woods
2022-02-16  2:32               ` Greg A. Woods
2022-02-16  3:36                 ` Eli Zaretskii
2022-02-16 21:55                   ` Greg A. Woods [this message]
2022-02-16 22:14                 ` Lars Ingebrigtsen
     [not found] ` <handler.53924.B.164452023325832.ack@debbugs.gnu.org>
2022-02-10 22:42   ` Greg A. Woods

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=m1nKSGL-003DIj0@more.local \
    --to=woods@robohack.ca \
    --cc=53924@debbugs.gnu.org \
    --cc=eliz@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.
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).