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

Previous Next

Packages: ns, emacs;

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


View this message in rfc822 format

From: David Reitter <david.reitter <at> gmail.com>
To: Francis Devereux <francis <at> devrx.org>
Cc: Adrian Robert <adrian.b.robert <at> gmail.com>, 4736 <at> debbugs.gnu.org, John Whitley <whitley <at> acm.org>, emacs-devel <at> gnu.org
Subject: bug#4736: 23.1; ns-antialias-text set to nil has no effect
Date: Sun, 14 Feb 2010 10:38:38 -0500
[Message part 1 (text/plain, inline)]
On Feb 14, 2010, at 8:31 AM, Francis Devereux wrote:

> On 17 Oct 2009, at 13:16, Adrian Robert wrote:
> 
>> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4736
> 
> 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


ns_antialias_text is wrongly declared as an int instead of Lisp_Object, and the nonstandard pointer comparison to Qnil helped cover it up, I suppose.  That also explains why it happened to work on 32bit.   Try the patch below.



diff --git a/src/nsfont.m b/src/nsfont.m
index 934fefa..1b157ce 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -50,7 +50,7 @@ extern Lisp_Object Qnormal, Qbold, Qitalic, Qcondensed, Qexpanded;
 static Lisp_Object Vns_reg_to_script;
 static Lisp_Object Qapple, Qroman, Qmedium;
 extern Lisp_Object Qappend;
-extern int ns_antialias_text;
+extern Lisp_Object ns_antialias_text;
 extern float ns_antialias_threshold;
 extern int ns_tmp_flags;
 extern struct nsfont_info *ns_tmp_font;
@@ -1243,7 +1245,7 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
 
     CGContextSetFont (gcontext, font->cgfont);
     CGContextSetFontSize (gcontext, font->size);
-    if (ns_antialias_text == Qnil || font->size <= ns_antialias_threshold)
+    if (NILP (ns_antialias_text) || font->size <= ns_antialias_threshold)
       CGContextSetShouldAntialias (gcontext, 0);
     else
       CGContextSetShouldAntialias (gcontext, 1);

[PGP.sig (application/pgp-signature, inline)]

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.