GNU bug report logs -
#8651
`raise' properties on NextStep
Previous Next
Reported by: Alp Aker <aker <at> pitt.edu>
Date: Wed, 11 May 2011 07:51:01 UTC
Severity: important
Tags: patch
Merged with 7831,
8913
Found in version 23.2
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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.
This bug report was last modified 13 years and 299 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.