GNU bug report logs - #4736
23.1; ns-antialias-text set to nil has no effect

Previous Next

Packages: emacs, ns;

Reported by: John Whitley <whitley <at> acm.org>

Date: Fri, 16 Oct 2009 04:05:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 4736 <at> debbugs.gnu.org (full text, mbox):

From: Francis Devereux <francis <at> devrx.org>
To: Adrian Robert <adrian.b.robert <at> gmail.com>
Cc: John Whitley <whitley <at> acm.org>, 4736 <at> debbugs.gnu.org,
	emacs-devel <at> gnu.org
Subject: Re: 23.1; ns-antialias-text set to nil has no effect
Date: Sun, 14 Feb 2010 13:31:19 +0000
On 17 Oct 2009, at 13:16, Adrian Robert wrote:

> http://debbugs.gnu.org/cgi/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





This bug report was last modified 15 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.