bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Chong Yidong
Subject: bug#8863: 23.3; Strikethrough won't display on MacOS
Date: Sat, 18 Jun 2011 17:48:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Dave Abrahams <dave@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)
        {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]