Subject: Re: bug#8863: 23.3; Strikethrough won't display on MacOS

From: Chong Yidong <[email-masked]>
Date: Sat, 18 Jun 2011 17:48:41 -0400

Dave Abrahams <[email-masked]> 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)
        {