From: Vincent Lefevre <vincent@vinc17.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44284@debbugs.gnu.org
Subject: bug#44284: 27.1; with some Unicode font, scrolling upward with the mouse wheel actually scrolls downward when the cursor needs repositioning
Date: Sun, 1 Nov 2020 01:24:30 +0100 [thread overview]
Message-ID: <20201101002430.GL27593@zira.vinc17.org> (raw)
In-Reply-To: <20201031224324.GK27593@zira.vinc17.org>
On 2020-10-31 23:43:24 +0100, Vincent Lefevre wrote:
> What is wrong seems to be the initial position of the text in the
> window. Indeed, with xmag (magnifier), I can see that the glyphs
> are shifted one line downward. Now, I don't know where to look at.
The issue is in xdisp.c, function compute_line_metrics.
With size 14, one gets row->height = 14 and everything is fine.
With size 13, one gets row->height = 13 initially, but one enters
the following condition:
/* If first line's physical ascent is larger than its logical
ascent, use the physical ascent, and make the row taller.
This makes accented characters fully visible. */
if (row == MATRIX_FIRST_TEXT_ROW (it->w->desired_matrix)
&& row->phys_ascent > row->ascent)
{
row->height += row->phys_ascent - row->ascent;
row->ascent = row->phys_ascent;
}
where row->height is increased to 14, hence the issue with the first
line. One successively gets
it->current_y = 0
it->current_y = 14
it->current_y = 27
adding 13 each time for the following lines.
With size 14:
row->phys_ascent = 12
row->ascent = 12
With size 13:
row->phys_ascent = 12
row->ascent = 11
I don't know where phys_ascent comes from, but it does not seem to be
in the font description. Anyway, this case is not handled correctly
by Emacs.
Note also that when building without cairo (--without-cairo), I get
with size 13:
row->phys_ascent = 11
row->ascent = 11
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
next prev parent reply other threads:[~2020-11-01 0:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 16:36 bug#44284: 27.1; with some Unicode font, scrolling upward with the mouse wheel actually scrolls downward when the cursor needs repositioning Vincent Lefevre
2020-10-28 16:44 ` Vincent Lefevre
2020-10-28 16:53 ` Eli Zaretskii
2020-10-30 10:52 ` Vincent Lefevre
2020-10-30 11:31 ` Eli Zaretskii
2020-10-30 13:33 ` Vincent Lefevre
2020-10-30 13:37 ` Eli Zaretskii
2020-10-30 16:31 ` Vincent Lefevre
2020-10-30 20:34 ` Vincent Lefevre
2020-10-30 20:57 ` Vincent Lefevre
2020-10-30 21:09 ` Eli Zaretskii
2020-10-30 23:00 ` Vincent Lefevre
2020-10-31 0:46 ` Vincent Lefevre
2020-10-31 1:13 ` Vincent Lefevre
2020-10-31 7:38 ` Eli Zaretskii
2020-10-31 22:43 ` Vincent Lefevre
2020-11-01 0:24 ` Vincent Lefevre [this message]
2020-11-01 0:28 ` Vincent Lefevre
2020-11-01 16:15 ` Eli Zaretskii
2020-11-01 16:15 ` Eli Zaretskii
2020-11-01 17:32 ` Vincent Lefevre
2020-11-01 17:43 ` Eli Zaretskii
2020-11-01 18:34 ` Vincent Lefevre
2020-11-01 18:47 ` Eli Zaretskii
2020-11-01 21:13 ` Vincent Lefevre
2020-11-07 8:29 ` Eli Zaretskii
2020-11-07 10:35 ` Vincent Lefevre
2020-11-07 13:22 ` Eli Zaretskii
2020-11-01 15:55 ` Eli Zaretskii
2020-11-01 17:26 ` Vincent Lefevre
2020-10-30 20:58 ` Eli Zaretskii
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=20201101002430.GL27593@zira.vinc17.org \
--to=vincent@vinc17.net \
--cc=44284@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 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.