From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alp Aker Newsgroups: gmane.emacs.bugs Subject: bug#8651: `raise' properties on NextStep Date: Tue, 10 May 2011 18:14:31 +0000 (UTC) Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1305100270 27029 80.91.229.12 (11 May 2011 07:51:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 May 2011 07:51:10 +0000 (UTC) To: 8651@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 11 09:51:06 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QK4CI-0001nR-4o for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 May 2011 09:51:06 +0200 Original-Received: from localhost ([::1]:51495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK4CH-0007FY-IZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 May 2011 03:51:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK4CF-0007FR-IH for bug-gnu-emacs@gnu.org; Wed, 11 May 2011 03:51:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QK4CE-0000ir-HU for bug-gnu-emacs@gnu.org; Wed, 11 May 2011 03:51:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK4CE-0000ik-G7 for bug-gnu-emacs@gnu.org; Wed, 11 May 2011 03:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QK4CD-0000DF-Pm; Wed, 11 May 2011 03:51:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alp Aker Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 May 2011 07:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8651 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.1305100225757 (code B ref -1); Wed, 11 May 2011 07:51:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 May 2011 07:50:25 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QK4Bc-0000C8-PO for submit@debbugs.gnu.org; Wed, 11 May 2011 03:50:25 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QK4Ba-0000Bt-6Q for submit@debbugs.gnu.org; Wed, 11 May 2011 03:50:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QK4BU-0000fh-3h for submit@debbugs.gnu.org; Wed, 11 May 2011 03:50:16 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:55719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK4BU-0000fd-2C for submit@debbugs.gnu.org; Wed, 11 May 2011 03:50:16 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK4BT-0007Ea-59 for bug-gnu-emacs@gnu.org; Wed, 11 May 2011 03:50:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QK4BS-0000fF-2Q for bug-gnu-emacs@gnu.org; Wed, 11 May 2011 03:50:15 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:55941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QK4BR-0000f2-La for bug-gnu-emacs@gnu.org; Wed, 11 May 2011 03:50:14 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QK4BI-0001Gb-QE for bug-gnu-emacs@gnu.org; Wed, 11 May 2011 09:50:05 +0200 Original-Received: from pool-71-182-163-252.pitbpa.east.verizon.net ([71.182.163.252]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2011 09:50:04 +0200 Original-Received: from aker by pool-71-182-163-252.pitbpa.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 May 2011 09:50:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 71.182.163.252 (Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 11 May 2011 03:51:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46382 Archived-At: Yesterday it came up on a thread on the devel list that on NextStep the `raise' property increases line height but does nothing more; it doesn't alter the vertical positioning of characters. The question then arose whether this was a bug on NextStep, since the implementation of display properties isn't OS-specific. Some hasty investigation appears to show that the problem is actually in the implementation of the glyph-drawing routines for NextStep. Make the following change to the trunk: === modified file 'src/nsfont.m' --- src/nsfont.m 2011-04-16 03:14:08 +0000 +++ src/nsfont.m 2011-05-10 17:13:25 +0000 @@ -1273,6 +1273,8 @@ else [col set]; + r.origin.y = s->ybase; + CGContextSetTextPosition (gcontext, r.origin.x, r.origin.y); CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->cmp_from, advances, len); and build with `./configure --with-ns'. The result is an executable in which `raise' properties have the documented behavior. The above change is naive, and will break other things (such as underline positioning), but it serves as a proof of concept that the issue is on Emacs's side. As far as I can see, the problem is this (please correct me if I've misunderstood the display routine, which is likely). Changes in vertical character position that result from display properties are processed in xdisp.c, and those changes are reflected in the value of the ybase field. But many of the gylph-drawing functions in nsterm.m and nsfont.m only check the y field to determine the vertical position of a glyph; they don't use ybase at all.