emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: High-res Customize icons


From: Eli Zaretskii
Subject: Re: High-res Customize icons
Date: Sat, 25 Apr 2020 09:39:20 +0300

> From: Richard Stallman <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Fri, 24 Apr 2020 23:34:10 -0400
> 
>   > But the fonts it provides declare support for portions of Unicode
>   > where they have glyphs for only one or a small number of characters.
>   > So if this font is installed and available to the Emacs font-selection
>   > routines, it will at best make the search for a font slower, and at
>   > worst might cause some characters be displayed as boxes with hex
>   > codes, although some other font on the system could have displayed
>   > that character.
> 
> These fonts don't HAVE to be selected via the usual Emacs font selection
> mechanism.  It should be easy enough to force use of some specific font
> for them.

"Easy enough" is IME too optimistic, to say the least.  The Emacs
font-selection machinery is very complex and notoriously
under-documented.  It manipulates 3 similar, but different object
types, whose reference to the reality and the role in eventually
selecting a suitable font is at least in my eyes unclear and
confusing.  We don't have active developers on board who know that
code well enough to make deep changes in it without breaking
something.  So I doubt if "easy" is anywhere near the truth.

That said, we currently have no way known to me to special-case any
fonts for selection or non-selection limited to some special use
cases.  (Of course, no one in this discussion has suggested how to
define those special cases, either, so we are largely having an
academic argument here.  What else is new.)  We can only say "don't
select this font for anything", which is both inappropriate for the
purpose being discussed, and is not what's needed.

So what you propose must be coded first, and in C.  If someone
presents the code to do that and the spec for Lisp-level feature that
would expose such capabilities, we could discuss that, regardless of
whether this should or shouldn't be used for the purpose of making the
Emacs UI more "shiny".

But that's not what is being proposed here.  What is being proposed is
to use special fonts, that Emacs will provide as part of its tarball,
and which will use special PUA codepoints to display some icons.  This
will (a) make other programs be aware of these fonts and try using
them, (b) get in the way of unrelated uses of those same PUA
codepoints, and (c) make Emacs's search for a suitable font slower and
more expensive.  So I think we shouldn't take this path.  We should
instead use real images, which Emacs already knows how to display.

> We don't have to specify display of these font glyphs by putting a
> funny character into a buffer or string with a face property.
> Doing it that way is one possible Lisp interface to those fonts.

That's the only interface that was proposed.  What other interfaces do
you have in mind?  Anything concrete in particular?

Please keep in mind the higher-level context of this discussion: we
are being told that Emacs presents an archaic UI while ready-to-use
solutions exist out there that solve this issue nicely and easily.  We
are being pointed to this use of fonts with PUA codepoints as one of
those solutions, and are being asked why not just take that package
and import it into core for immediate improvement of the UI.  Let's
please keep this context in mind when considering the opinions I
expressed on these proposals.  I wasn't just talking about some
abstract suggestion for using fonts for some abstract purpose in some
unspecified part of the Emacs display.  Frankly, I have little
interest in such abstract discussions.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]