unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: arthurschuster@eircom.net (Arthur G.P. Schuster)
Subject: Patch for Mac OS X Text Drawing
Date: Fri, 14 Jan 2005 21:39:28 +0100	[thread overview]
Message-ID: <m24qhj924f.fsf@Arthur.local> (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

             reply	other threads:[~2005-01-14 20:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-14 20:39 Arthur G.P. Schuster [this message]
2005-01-16  0:39 ` Patch for Mac OS X Text Drawing 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m24qhj924f.fsf@Arthur.local \
    --to=arthurschuster@eircom.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).