From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: arthurschuster@eircom.net (Arthur G.P. Schuster) Newsgroups: gmane.emacs.devel Subject: Patch for Mac OS X Text Drawing Date: Fri, 14 Jan 2005 21:39:28 +0100 Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1105735421 19871 80.91.229.6 (14 Jan 2005 20:43:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2005 20:43:41 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 14 21:43:35 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CpYIB-0004lK-00 for ; Fri, 14 Jan 2005 21:43:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CpYTu-0002pQ-4d for ged-emacs-devel@m.gmane.org; Fri, 14 Jan 2005 15:55:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CpYTP-0002iO-P3 for emacs-devel@gnu.org; Fri, 14 Jan 2005 15:55:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CpYTE-0002d7-Mg for emacs-devel@gnu.org; Fri, 14 Jan 2005 15:55:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CpYTD-0002bm-JK for emacs-devel@gnu.org; Fri, 14 Jan 2005 15:54:59 -0500 Original-Received: from [213.90.36.46] (helo=tatiana.utanet.at) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CpYEH-00056x-4W for emacs-devel@gnu.org; Fri, 14 Jan 2005 15:39:33 -0500 Original-Received: from patricia.utanet.at ([213.90.36.8]) by tatiana.utanet.at with esmtp (Exim 4.41) id 1CpYEF-00015v-9F for emacs-devel@gnu.org; Fri, 14 Jan 2005 21:39:31 +0100 Original-Received: from dsl-69-74.utaonline.at ([81.189.69.74] helo=Arthur.local) by patricia.utanet.at with esmtp (Exim 4.43) id 1CpYEE-0006ra-SP for emacs-devel@gnu.org; Fri, 14 Jan 2005 21:39:31 +0100 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32230 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32230 --=-=-= 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 ) 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. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=macterm.diff Content-Description: macterm.c.diff *** /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 } --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --=-=-=--