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

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

bug#20628: 25.0.50; Incorrect line height for some fonts


From: Eli Zaretskii
Subject: bug#20628: 25.0.50; Incorrect line height for some fonts
Date: Fri, 22 May 2015 16:13:59 +0300

> From: Oleh Krehel <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Fri, 22 May 2015 14:49:16 +0200
> 
> The test file with contents:
>     asdf 𝞳
> 
> is displayed fine with "emacs -nw" when inside a GNOME Terminal.

In "emacs -nw", Emacs doesn't perform layout, it just writes the
characters using stdio functions.  It's the terminal emulator that
performs layout.

> Other applications like Firefox, Gedit, and Chromium also display it
> fine.

Knowing that doesn't help in fixing Emacs behavior.

> Could you point me to a code position in Emacs where the line pixel
> height is determined.

It's in xdisp.c:x_produce_glyphs.  Emacs updates the line's ascent and
descent as it processes each character for display, based on the data
it gets from the font used by the face of that character.  Later in
display_line, the height of each screen line is determined:

          row->ascent = max (row->ascent, it->max_ascent);
          row->height = max (row->height, it->max_ascent + it->max_descent);
          row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent);
          row->phys_height = max (row->phys_height,
                                  it->max_phys_ascent + it->max_phys_descent);
          row->extra_line_spacing = max (row->extra_line_spacing,
                                         it->max_extra_line_spacing);

> I'll try to play around with it, maybe I can fix it at least for
> GTK.

This code is device independent, so GTK doesn't come into play here.

Thanks in advance for any solutions you might find and/or suggest.





reply via email to

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