unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch for Mac OS X Text Drawing
@ 2005-01-14 20:39 Arthur G.P. Schuster
  2005-01-16  0:39 ` Steven Tamm
  0 siblings, 1 reply; 17+ messages in thread
From: Arthur G.P. Schuster @ 2005-01-14 20:39 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: macterm.c.diff --]
[-- Type: text/x-patch, Size: 605 bytes --]

*** /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
  }
  
  

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2005-01-24 18:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-14 20:39 Patch for Mac OS X Text Drawing Arthur G.P. Schuster
2005-01-16  0:39 ` Steven Tamm
2005-01-16  8:04   ` Arthur G.P. Schuster
2005-01-17  3:18   ` YAMAMOTO Mitsuharu
2005-01-17  5:31     ` Steven Tamm
2005-01-17 11:21       ` YAMAMOTO Mitsuharu
2005-01-18 15:40   ` Piet van Oostrum
2005-01-19 11:48     ` YAMAMOTO Mitsuharu
2005-01-21  7:57       ` YAMAMOTO Mitsuharu
2005-01-22  2:52         ` Richard Stallman
2005-01-22  3:47           ` YAMAMOTO Mitsuharu
2005-01-22  4:55             ` Kenichi Handa
2005-01-22  5:49               ` YAMAMOTO Mitsuharu
     [not found]         ` <200501210353.j0L3rbj16707@church.math.s.chiba-u.ac.jp>
2005-01-24  9:36           ` YAMAMOTO Mitsuharu
2005-01-24 10:08             ` Kim F. Storm
2005-01-24 11:15               ` YAMAMOTO Mitsuharu
2005-01-24 18:00                 ` Steven Tamm

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).