From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: master f1baa15: Fix display when a font claims large values of ascent and descent Date: Mon, 08 Jun 2015 13:44:40 -0400 Message-ID: <4bh9qiw0vr.fsf@fencepost.gnu.org> References: <20150606131216.11369.14106@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1433785533 28004 80.91.229.3 (8 Jun 2015 17:45:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2015 17:45:33 +0000 (UTC) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 08 19:45:33 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z2175-0008JP-4g for ged-emacs-devel@m.gmane.org; Mon, 08 Jun 2015 19:45:31 +0200 Original-Received: from localhost ([::1]:59459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2174-0002zN-G1 for ged-emacs-devel@m.gmane.org; Mon, 08 Jun 2015 13:45:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z216K-0002Cr-7Z for emacs-devel@gnu.org; Mon, 08 Jun 2015 13:44:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z216I-0004fK-U2 for emacs-devel@gnu.org; Mon, 08 Jun 2015 13:44:44 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z216I-0004fG-Rb for emacs-devel@gnu.org; Mon, 08 Jun 2015 13:44:42 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1Z216G-0008Up-RZ; Mon, 08 Jun 2015 13:44:40 -0400 X-Spook: Khaddafi Mantis Hazmat Islamist Al Jazeera Terror Cyber X-Ran: pm|haHbRDcm%bMTRvnbW*wdn:ESYF#}-a{_pst`{r$sl6oON_`fFXAq["[leJ{J/7$2~1^ X-Hue: green X-Attribution: GM In-Reply-To: (Eli Zaretskii's message of "Sat, 06 Jun 2015 13:12:17 +0000") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187107 Archived-At: Eli Zaretskii wrote: > branch: master > commit f1baa156503f089d6627171e0e9ad73bbdbb7268 [...] > @@ -19188,6 +19200,23 @@ append_space_for_newline (struct it *it, bool default_face_p) > > PRODUCE_GLYPHS (it); > > + /* Make sure this space glyph has the right ascent and > + descent values, or else cursor at end of line will look > + funny. */ > + g = it->glyph_row->glyphs[TEXT_AREA] + n; > + struct font *font = face->font ? face->font : FRAME_FONT (it->f); > + if (n == 0 || it->glyph_row->height < font->pixel_size) > + { > + normal_char_ascent_descent (font, -1, &it->ascent, &it->descent); > + it->max_ascent = it->ascent; > + it->max_descent = it->descent; > + /* Make sure compute_line_metrics recomputes the row height. */ > + it->glyph_row->height = 0; > + } > + > + g->ascent = it->max_ascent; > + g->descent = it->max_descent; > + This bit causes a warning in without-x builds, eg http://hydra.nixos.org/build/23007744/log/raw xdisp.c:19210:8: warning: implicit declaration of function 'normal_char_ascent_descent' [-Wimplicit-function-declaration] normal_char_ascent_descent (font, -1, &it->ascent, &it->descent);