GNU bug report logs - #8863
23.3; Strikethrough won't display on MacOS

Previous Next

Packages: ns, emacs;

Reported by: Dave Abrahams <dave <at> boostpro.com>

Date: Tue, 14 Jun 2011 16:06:02 UTC

Severity: important

Found in version 23.3

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 8863 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Dave Abrahams <dave <at> boostpro.com>
Cc: 8863 <at> debbugs.gnu.org
Subject: Re: bug#8863: 23.3; Strikethrough won't display on MacOS
Date: Sat, 18 Jun 2011 17:48:41 -0400
Dave Abrahams <dave <at> boostpro.com> writes:

> Title says it all.  Faces with the "strikethrough" property set show up
> as un-struck-through.

Does this (100% untested) patch do the right thing?

*** src/nsfont.m	2011-01-02 23:50:46 +0000
--- src/nsfont.m	2011-06-18 21:48:28 +0000
***************
*** 1188,1193 ****
--- 1188,1207 ----
  /*[context GSSetTextDrawingMode: GSTextFill]; /// not implemented yet */
        }
  
+     /* do strike-through */
+     if (face->strike_through_p)
+       {
+ 	float line_y = r.origin.y - 0.5 * font->height;
+         if (face->strike_through_color != 0)
+           [ns_lookup_indexed_color (face->strike_through_color, s->f) set];
+         else
+           [col set];
+         DPSmoveto (context, r.origin.x, line_y);
+         DPSlineto (context, r.origin.x + r.size.width, line_y);
+         if (face->strike_through_color != 0)
+           [col set];
+       }
+ 
      /* do underline */
      if (face->underline_p)
        {




This bug report was last modified 14 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.