bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#44284: 27.1; with some Unicode font, scrolling upward with the mouse


From: Vincent Lefevre
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
User-agent: Mutt/1.14.5+76 (bb407ec3) vl-127292 (2020-06-24)

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)





reply via email to

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