Hello,
this is the first patch I have ever sent (and also the first time I
used Ediff), so be kind. I found out (at
<http://developer.apple.com/qa/qa2001/qa1193.html>) how to draw text
with Quartz 2D without changing any of the old QuickDraw code. The
advantage of Quartz is much better anti-aliasing. And because I
desperately wanted this anti-aliasing in Emacs Carbon, I searched for
the relevant section in the code and added a few lines as suggested by
Apple. It works on my computer (running Mac OS 10.3.7), but I have no
idea about the consequences for others, as I don't really know how
Emacs works internally.
I hope it helps to make Emacs more user-friendly on the Mac,
Arthur.
*** /tmp/ediff5861-oC Fri Jan 14 21:23:26 2005
--- /Users/aschus/Developer/emacs/src/macterm.c Fri Jan 14 19:07:09
2005
***************
*** 724,729 ****
--- 724,734 ----
char *buf;
int nchars, mode, bytes_per_char;
{
+ #ifdef MAC_OSX
+ UInt32 newFlags = kQDUseCGTextRendering;
+ UInt32 savedFlags = SwapQDTextFlags(newFlags);
+ #endif
+
SetPortWindowPort (w);
mac_set_colors (gc);
***************
*** 735,740 ****
--- 740,749 ----
MoveTo (x, y);
DrawText (buf, 0, nchars * bytes_per_char);
+
+ #ifdef MAC_OSX
+ SwapQDTextFlags(savedFlags);
+ #endif
}
_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel