unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: Variable pitch text filling
Date: Mon, 29 Nov 2021 16:01:15 +0200	[thread overview]
Message-ID: <83v90buklw.fsf@gnu.org> (raw)
In-Reply-To: <87zgpn13ce.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon,  29 Nov 2021 14:46:57 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org
> Date: Mon, 29 Nov 2021 14:46:57 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Right.  This reminds me -- perhaps we'd want to distribute the extra
> >> space both before and after the glyph, to centre it within its allotted
> >> width?
> >
> > I don't think so, because that would move the leftmost character away
> > from the window-edge.
> 
> Yes...  but it that necessarily bad?

Yes, IMO, because the text will seem to shift.

It is also unnecessary, because having 2 pixels to the right of each
character is practically indistinguishable from having one pixel on
the left and 1 pixel on the right: you still end up with 2 pixels
between any two characters.

> > That's not the best possibility, because if some part of the affected
> > text uses a smaller font, you'd see glyphs that are too-widely spaced?
> 
> All these specs (`space' and whatnot) refer to FRAME_COLUMN_WIDTH in
> their logic.  (I mean, for those parts that aren't actual pixels.)

Yes, but FRAME_COLUMN_WIDTH only reflects the dimensions of the
frame's default face's font.  If you use another face with a different
(smaller) font, FRAME_COLUMN_WIDTH won't change.  Think about a
feature where footnotes are shown in a smaller font.

> And I'm not quite sure what you mean here -- we're talking about
> allowing people to "quantise" the widths to some common multiple, which
> means that that is indeed what you'd see.  But that's what the user
> asked for.
> 
> So mixing in smaller fonts in such a display wouldn't really be part of
> the remit...

I think it should be.  Each face in Emacs has what I call "ASCII
font": that's the face's font used for the ASCII (and usually also
Latin) characters.  My idea is to take the "standard" width from that
ASCII font of the face.  Then we can provide this feature for every
possible face, and the result will be visually reasonable, since
smaller faces will have smaller "standard" width, and will have fewer
added pixels to the double-width characters displayed in that face.

It's the same idea as I used for the enlarged height (which was
rejected, but not because of this aspect), just for the width and not
for the height.




  reply	other threads:[~2021-11-29 14:01 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26 14:45 Variable pitch text filling Lars Ingebrigtsen
2021-11-26 15:04 ` Eli Zaretskii
2021-11-26 15:10   ` Lars Ingebrigtsen
2021-11-26 16:22     ` Eli Zaretskii
2021-11-26 17:03       ` Stefan Monnier
2021-11-27  7:12       ` Lars Ingebrigtsen
2021-11-27  7:43         ` Eli Zaretskii
2021-11-27  8:04           ` Lars Ingebrigtsen
2021-11-27  8:35             ` Eli Zaretskii
2021-11-27 14:28               ` Lars Ingebrigtsen
2021-11-27 14:55                 ` Eli Zaretskii
2021-11-27 19:36                   ` Eli Zaretskii
2021-11-29 13:50                     ` Lars Ingebrigtsen
2021-11-29 14:02                       ` Eli Zaretskii
2021-11-29 15:09                         ` Lars Ingebrigtsen
2021-11-29 15:20                           ` Eli Zaretskii
2021-11-29 18:44                             ` Lars Ingebrigtsen
2021-12-01  4:35                               ` Lars Ingebrigtsen
2021-12-01  5:31                                 ` Eli Zaretskii
2021-12-01  5:38                                   ` Lars Ingebrigtsen
2021-12-01 12:28                                     ` Eli Zaretskii
2021-12-01 14:33                                       ` Lars Ingebrigtsen
2021-12-01 14:45                                         ` Eli Zaretskii
2021-12-01 15:10                                           ` Lars Ingebrigtsen
2021-12-01 16:42                                             ` Eli Zaretskii
2021-12-01 16:49                                               ` Lars Ingebrigtsen
2021-12-01 16:57                                                 ` Eli Zaretskii
2021-12-01 17:02                                                   ` Lars Ingebrigtsen
2021-12-01 17:22                                                     ` Eli Zaretskii
2021-12-01 17:35                                                       ` Lars Ingebrigtsen
2021-12-01 17:49                                                         ` Eli Zaretskii
2021-12-01 17:52                                                           ` Lars Ingebrigtsen
2021-12-01 17:56                                                             ` Eli Zaretskii
2021-12-01 18:19                                                               ` Lars Ingebrigtsen
2021-12-01 18:47                                                                 ` Eli Zaretskii
2021-12-01 18:52                                                                   ` Lars Ingebrigtsen
2021-12-01 19:15                                                                     ` Eli Zaretskii
2021-12-01 19:23                                                                       ` Lars Ingebrigtsen
2021-12-01 19:29                                                                         ` Eli Zaretskii
2021-12-01 19:34                                                                           ` Lars Ingebrigtsen
2021-12-01 19:58                                                                             ` Eli Zaretskii
2021-12-02  8:15                                                                               ` Lars Ingebrigtsen
2021-12-02  8:46                                                                                 ` Eli Zaretskii
2021-12-02  8:56                                                                                   ` Lars Ingebrigtsen
2021-12-02  9:34                                                                                     ` Eli Zaretskii
2021-12-03 15:43                                                                                       ` Lars Ingebrigtsen
2021-12-02 20:32                                                                                     ` Jim Porter
2021-12-02 21:19                                                                                       ` Stefan Kangas
2021-12-02 22:00                                                                                         ` [External] : " Drew Adams
2021-12-02 22:32                                                                                         ` Jim Porter
2021-12-03  7:08                                                                                           ` Eli Zaretskii
2021-12-03  7:14                                                                                             ` Po Lu
2021-12-03 18:15                                                                                             ` Jim Porter
2021-12-03 18:53                                                                                               ` Stefan Kangas
2021-12-03  0:41                                                                                         ` Po Lu
2021-12-03  6:58                                                                                         ` Eli Zaretskii
2021-12-03 15:45                                                                                         ` Lars Ingebrigtsen
2021-12-01 19:30                                                                 ` Jim Porter
2021-12-02 17:53                                                         ` Eli Zaretskii
2021-12-02 19:03                                                           ` Yuan Fu
2021-12-02 19:38                                                             ` Eli Zaretskii
2021-12-02 20:18                                                             ` Eli Zaretskii
2021-12-03  8:10                                                               ` Eli Zaretskii
2021-12-03  8:17                                                                 ` Feng Shu
2021-12-03 11:31                                                                   ` Eli Zaretskii
2021-12-03 11:55                                                                     ` Feng Shu
2021-12-03 12:23                                                                       ` Eli Zaretskii
2021-12-03  8:51                                                                 ` Feng Shu
2021-12-03 11:35                                                                   ` Eli Zaretskii
2021-12-03 11:44                                                                     ` Feng Shu
2021-12-03 11:52                                                                       ` Eli Zaretskii
2021-12-03 11:47                                                                     ` Feng Shu
2021-12-03 15:41                                                                 ` Lars Ingebrigtsen
2021-12-03 19:38                                                                   ` Eli Zaretskii
2021-12-04  0:35                                                                     ` Po Lu
2021-12-04  7:45                                                                       ` Eli Zaretskii
2021-12-04  5:41                                                                     ` Lars Ingebrigtsen
2021-12-04  8:02                                                                       ` Eli Zaretskii
2021-12-04 19:00                                                                         ` Lars Ingebrigtsen
2021-12-01  5:39                                   ` chad
2021-12-01  6:52                                     ` Eli Zaretskii
2021-12-01  6:59                                       ` Yuri Khan
2021-12-01 18:14                                       ` john muhl
2021-11-29 13:46                   ` Lars Ingebrigtsen
2021-11-29 14:01                     ` Eli Zaretskii [this message]
2021-11-29 14:09                       ` Lars Ingebrigtsen
2021-11-29 14:14                         ` Eli Zaretskii
2021-11-29 14:19                           ` Lars Ingebrigtsen
2021-11-29 14:25                             ` Eli Zaretskii
2021-11-29 14:27                               ` Lars Ingebrigtsen
2021-11-29 18:44                         ` Yuan Fu
2021-11-29 19:28                           ` Eli Zaretskii
2021-11-29 20:15                             ` Yuan Fu
2021-11-26 16:47     ` Yuan Fu
2021-12-01 17:07     ` Stefan Kangas
2021-12-01 17:26       ` Eli Zaretskii
2021-11-26 15:08 ` Ihor Radchenko
2021-11-26 15:11   ` Lars Ingebrigtsen
2021-11-30  1:09 ` Lars Ingebrigtsen

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=83v90buklw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.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).