From: Francis Devereux <francis@devrx.org>
To: Adrian Robert <adrian.b.robert@gmail.com>
Cc: John Whitley <whitley@acm.org>,
4736@emacsbugs.donarmstrong.com, emacs-devel@gnu.org
Subject: Re: 23.1; ns-antialias-text set to nil has no effect
Date: Sun, 14 Feb 2010 13:31:19 +0000 [thread overview]
Message-ID: <B92EACBD-D004-40A8-8FAB-C5CB4EBBA76A@devrx.org> (raw)
In-Reply-To: <3D80FB40-724F-4789-8807-E1C8A8A40375@gmail.com>
On 17 Oct 2009, at 13:16, Adrian Robert wrote:
> http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4736
>
> I cannot reproduce this. You must make a new frame or otherwise trigger full redrawing, but it works here. Please experiment a little, and if you can narrow down the conditions that cause failure, please report back.
I can reproduce this. If I build Emacs on Mac OS X 10.6 then ns-antialias-text has no effect - text is always anti-aliased (as John reports). However, if I build Emacs on OS X 10.5 and then copy Emacs.app to my 10.6 machine, then setting ns-antialias-text to nil works as expected (i.e. it disables anti aliasing).
John, are you using 10.5 or 10.6?
I've also discovered that if I build Emacs as a 32 bit binary on 10.6 (the default is 64 bit on 10.6) with the following command then ns-antialias-text works. The commands I used to build are:
LDFLAGS="-arch i386" CFLAGS="-g -O2 -arch i386 -march=core2" ../trunk/configure --build=i386-apple-darwin10.2.0 --with-ns && make -j2 && make install
I added some logging and built in 64 bit mode. The output is interesting, it looks like the test ns_antialias_text == Qnil is returning false because ns_antialias_text is corrupt. I'm not really sure what is happening though - I have next to no knowledge of Emacs internals.
Changes:
--- src/nsfont.m 2010-02-08 23:39:01 +0000
+++ src/nsfont.m 2010-02-14 09:07:25 +0000
@@ -1232,9 +1232,17 @@
CGContextSetFont (gcontext, font->cgfont);
CGContextSetFontSize (gcontext, font->size);
if (ns_antialias_text == Qnil || font->size <= ns_antialias_threshold)
+ {
CGContextSetShouldAntialias (gcontext, 0);
+ fprintf (stderr, "*** Disabled anti aliasing\n");
+ safe_debug_print (ns_antialias_text);
+ }
else
+ {
CGContextSetShouldAntialias (gcontext, 1);
+ fprintf (stderr, "*** Enabled anti aliasing, BITS_PER_EMACS_INT=%d\n", BITS_PER_EMACS_INT);
+ safe_debug_print (ns_antialias_text);
+ }
CGContextSetTextMatrix (gcontext, fliptf);
Output from 64-bit Emacs (the following is repeated many times):
*** Enabled anti aliasing, BITS_PER_EMACS_INT=64
#<INVALID_LISP_OBJECT 0x0180006a>
Francis
next parent reply other threads:[~2010-02-14 13:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3D80FB40-724F-4789-8807-E1C8A8A40375@gmail.com>
2010-02-14 13:31 ` Francis Devereux [this message]
2010-02-14 15:38 ` 23.1; ns-antialias-text set to nil has no effect David Reitter
2010-02-14 16:01 ` Francis Devereux
2010-02-15 23:36 ` John Whitley
2010-02-25 20:40 ` Francis Devereux
2010-02-26 0:49 ` Chong Yidong
2010-02-27 20:42 ` Francis Devereux
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=B92EACBD-D004-40A8-8FAB-C5CB4EBBA76A@devrx.org \
--to=francis@devrx.org \
--cc=4736@emacsbugs.donarmstrong.com \
--cc=adrian.b.robert@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=whitley@acm.org \
/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).