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: tumashu@163.com, casouri@gmail.com, emacs-devel@gnu.org
Subject: Re: Variable pitch text filling
Date: Fri, 03 Dec 2021 21:38:08 +0200	[thread overview]
Message-ID: <83pmqd7a3j.fsf@gnu.org> (raw)
In-Reply-To: <877dclzoeo.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri,  03 Dec 2021 16:41:35 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: casouri@gmail.com,  tumashu@163.com,  emacs-devel@gnu.org
> Date: Fri, 03 Dec 2021 16:41:35 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > This is one of the "TIL" situations each one of us has with Emacs from
> > time to time.  It means my thinking about adding character spacing was
> > based on wrong assumptions, and the only way to do that is to add
> > stretch glyphs (which can be done only between words).
> 
> Why can stretch glyphs only be added between words?  Is it because we
> ask the font backend to draw a series of glyphs in one go?

Yes.  A series of glyphs of the same type (character glyphs, stretch
glyphs, composition glyphs, etc.) are collected into a "glyph string"
and drawn by the backend in one go.

> If that's the case, perhaps we could stop doing that if we're doing a
> gridded display?

That'd be much slower, I guess?  For each such separate glyph we need
first clear the background with the color of the face, then draw the
glyph itself.  Right now, we clear the background for all of the
glyphs in one GUI call, then write all of the glyphs in a single call
to the font driver.

> One other thing that occurred to me (but I didn't look at closely) is
> whether it would be feasible to work on the glyph matrix for a line
> after it's been composed.  I remember you doing some work on that when
> we talked about "compressing the mode line" -- I think you basically
> went over the matrix and removed some of the space glyphs?  (That
> approach didn't work for other reasons, but the basic post processing
> thing did work, I think?)

That'd cause the same problem as above: each character glyph will be
drawn separately, because the stretch glyphs in-between them will
break the sequence of character glyphs into individual characters.

> Do we have enough info about the glyphs at that stage that we could add
> some stretch glyphs to gridify the line?

Yes, information is not the problem.



  reply	other threads:[~2021-12-03 19:38 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 [this message]
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
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=83pmqd7a3j.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=tumashu@163.com \
    /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).