all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Yasushi SHOJI <yashi@atmark-techno.com>
Cc: emacs-devel@gnu.org
Subject: Re: position of line moves depending on visible chars
Date: Fri, 22 Jul 2016 10:09:15 +0300	[thread overview]
Message-ID: <83bn1qxi78.fsf@gnu.org> (raw)
In-Reply-To: <CAKntEQ55YSF_PzM1dQMsWyHH5Eb226ajgE-cFn9jmJiu66YuPA@mail.gmail.com> (message from Yasushi SHOJI on Fri, 22 Jul 2016 09:01:05 +0900)

> From: Yasushi SHOJI <yashi@atmark-techno.com>
> Date: Fri, 22 Jul 2016 09:01:05 +0900
> Cc: emacs-devel@gnu.org
> 
> > The behavior was changed in order to avoid huge line spacing when a
> > font reports a preposterously large height.  Any option such as the
> > one you are talking about will have to keep the new behavior whereby
> > the display engine doesn't user the font height for drawing the cursor
> > on empty lines, because this will have an even worse effects.
> 
> Are you saying that the change is to workaround bad fonts?

Indirectly, yes.  The previous code used the font-global size, both
for layout of a line with text, and for empty lines.  With those "bad"
fonts, non-empty lines could be fixed by using the dimensions of the
individual characters, but empty lines didn't have even that.  So some
different algorithm needed to be used, and that's what you see now.
I agree that the results are sometimes less than satisfactory, so if
someone can come up with a solution that doesn't re-introduce the
original problems, I'm for it.

> > It's impossible to keep lines at the same spacing when multiple fonts
> > are involved anyway, so the situation you are describing is not new.
> 
> Would you enlighten me about this? (A link to bts would be fine.)

There are too many bits, unfortunately.  In a nutshell, the Emacs
display engine determines the height of each screen line and the
spacing between them after it traverses all the characters to be
displayed on that screen line.  Since characters in a line can have
different faces, including faces that define use of non-default fonts,
the results of this cannot be predicted in advance.

For a simple example of what that does start the Emacs Info browser,
and look at the chapter and section header lines: they are taller than
the rest.

> Are you saying that the working Emacs 24 is a pure luck? (having
> good fonts?)

In a way, yes.  Try setting your default font to Latin Modern Math,
and see what happens in Emacs 24.5 and in Emacs 25.  Bug#20628 has the
details.



      reply	other threads:[~2016-07-22  7:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 13:31 position of line moves depending on visible chars Yasushi SHOJI
2016-07-17 14:07 ` Eli Zaretskii
2016-07-17 16:40   ` Yasushi SHOJI
2016-07-17 17:14     ` Eli Zaretskii
2016-07-22  0:01       ` Yasushi SHOJI
2016-07-22  7:09         ` Eli Zaretskii [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bn1qxi78.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=yashi@atmark-techno.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.