* bug#4736: 23.1; ns-antialias-text set to nil has no effect
2010-02-14 13:31 ` Francis Devereux
@ 2010-02-14 15:38 ` David Reitter
2010-02-14 15:38 ` David Reitter
1 sibling, 0 replies; 15+ messages in thread
From: David Reitter @ 2010-02-14 15:38 UTC (permalink / raw)
To: Francis Devereux; +Cc: Adrian Robert, John Whitley, 4736, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]
On Feb 14, 2010, at 8:31 AM, Francis Devereux wrote:
> On 17 Oct 2009, at 13:16, Adrian Robert wrote:
>
>> http://emacsbugs.donarmstrong.com/cgi-bin/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);
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 203 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: 23.1; ns-antialias-text set to nil has no effect
2010-02-14 13:31 ` Francis Devereux
2010-02-14 15:38 ` bug#4736: " David Reitter
@ 2010-02-14 15:38 ` David Reitter
2010-02-14 16:01 ` Francis Devereux
2010-02-14 16:01 ` Francis Devereux
1 sibling, 2 replies; 15+ messages in thread
From: David Reitter @ 2010-02-14 15:38 UTC (permalink / raw)
To: Francis Devereux; +Cc: Adrian Robert, 4736, John Whitley, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]
On Feb 14, 2010, at 8:31 AM, Francis Devereux wrote:
> On 17 Oct 2009, at 13:16, Adrian Robert wrote:
>
>> http://emacsbugs.donarmstrong.com/cgi-bin/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);
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 203 bytes --]
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: 23.1; ns-antialias-text set to nil has no effect
2010-02-14 15:38 ` David Reitter
@ 2010-02-14 16:01 ` Francis Devereux
2010-02-15 23:36 ` John Whitley
2010-02-15 23:36 ` John Whitley
2010-02-14 16:01 ` Francis Devereux
1 sibling, 2 replies; 15+ messages in thread
From: Francis Devereux @ 2010-02-14 16:01 UTC (permalink / raw)
To: David Reitter; +Cc: Adrian Robert, 4736, John Whitley, emacs-devel
On 14 Feb 2010, at 15:38, David Reitter wrote:
> On Feb 14, 2010, at 8:31 AM, Francis Devereux wrote:
>
>> On 17 Oct 2009, at 13:16, Adrian Robert wrote:
>>
>>> http://emacsbugs.donarmstrong.com/cgi-bin/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.
Thanks David, works when compiled as 64 bit on OS X 10.6.2.
Francis
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 23.1; ns-antialias-text set to nil has no effect
2010-02-14 16:01 ` Francis Devereux
@ 2010-02-15 23:36 ` John Whitley
2010-02-25 20:40 ` bug#4736: " Francis Devereux
2010-02-25 20:40 ` Francis Devereux
2010-02-15 23:36 ` John Whitley
1 sibling, 2 replies; 15+ messages in thread
From: John Whitley @ 2010-02-15 23:36 UTC (permalink / raw)
To: Francis Devereux; +Cc: David Reitter, Adrian Robert, 4736, emacs-devel
On Feb 14, 2010, at 8:01 AM, Francis Devereux wrote:
> On 14 Feb 2010, at 15:38, David Reitter wrote:
>> 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.
>
> Thanks David, works when compiled as 64 bit on OS X 10.6.2.
Second confirmation. I built Emacs.app as 64 bit with David's patch against bzr revno 99498; the setting ns-antialias-text is now correctly observed.
Thanks Francis and David!
-- John
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4736: 23.1; ns-antialias-text set to nil has no effect
2010-02-15 23:36 ` John Whitley
@ 2010-02-25 20:40 ` Francis Devereux
2010-02-25 20:40 ` Francis Devereux
1 sibling, 0 replies; 15+ messages in thread
From: Francis Devereux @ 2010-02-25 20:40 UTC (permalink / raw)
To: emacs-devel; +Cc: David Reitter, Adrian Robert, John Whitley, 4736
On 15 Feb 2010, at 23:36, John Whitley wrote:
>
> On Feb 14, 2010, at 8:01 AM, Francis Devereux wrote:
>> On 14 Feb 2010, at 15:38, David Reitter wrote:
>>> 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.
>>
>> Thanks David, works when compiled as 64 bit on OS X 10.6.2.
>
> Second confirmation. I built Emacs.app as 64 bit with David's patch against bzr revno 99498; the setting ns-antialias-text is now correctly observed.
David's patch fixes the problem for both John and I, would it be possible for someone to commit it?
Francis
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 23.1; ns-antialias-text set to nil has no effect
2010-02-15 23:36 ` John Whitley
2010-02-25 20:40 ` bug#4736: " Francis Devereux
@ 2010-02-25 20:40 ` Francis Devereux
2010-02-26 0:49 ` bug#4736: " Chong Yidong
2010-02-26 0:49 ` Chong Yidong
1 sibling, 2 replies; 15+ messages in thread
From: Francis Devereux @ 2010-02-25 20:40 UTC (permalink / raw)
To: emacs-devel; +Cc: David Reitter, Adrian Robert, 4736, John Whitley
On 15 Feb 2010, at 23:36, John Whitley wrote:
>
> On Feb 14, 2010, at 8:01 AM, Francis Devereux wrote:
>> On 14 Feb 2010, at 15:38, David Reitter wrote:
>>> 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.
>>
>> Thanks David, works when compiled as 64 bit on OS X 10.6.2.
>
> Second confirmation. I built Emacs.app as 64 bit with David's patch against bzr revno 99498; the setting ns-antialias-text is now correctly observed.
David's patch fixes the problem for both John and I, would it be possible for someone to commit it?
Francis
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4736: 23.1; ns-antialias-text set to nil has no effect
2010-02-25 20:40 ` Francis Devereux
@ 2010-02-26 0:49 ` Chong Yidong
2010-02-26 0:49 ` Chong Yidong
1 sibling, 0 replies; 15+ messages in thread
From: Chong Yidong @ 2010-02-26 0:49 UTC (permalink / raw)
To: Francis Devereux
Cc: David Reitter, Adrian Robert, 4736, John Whitley, emacs-devel
Francis Devereux <francis@devrx.org> writes:
> David's patch fixes the problem for both John and I, would it be
> possible for someone to commit it?
Done.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 23.1; ns-antialias-text set to nil has no effect
2010-02-25 20:40 ` Francis Devereux
2010-02-26 0:49 ` bug#4736: " Chong Yidong
@ 2010-02-26 0:49 ` Chong Yidong
2010-02-27 20:42 ` Francis Devereux
2010-02-27 20:42 ` bug#4736: " Francis Devereux
1 sibling, 2 replies; 15+ messages in thread
From: Chong Yidong @ 2010-02-26 0:49 UTC (permalink / raw)
To: Francis Devereux
Cc: David Reitter, Adrian Robert, John Whitley, 4736, emacs-devel
Francis Devereux <francis@devrx.org> writes:
> David's patch fixes the problem for both John and I, would it be
> possible for someone to commit it?
Done.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 23.1; ns-antialias-text set to nil has no effect
2010-02-26 0:49 ` Chong Yidong
@ 2010-02-27 20:42 ` Francis Devereux
2010-02-27 20:42 ` bug#4736: " Francis Devereux
1 sibling, 0 replies; 15+ messages in thread
From: Francis Devereux @ 2010-02-27 20:42 UTC (permalink / raw)
To: Chong Yidong
Cc: David Reitter, Adrian Robert, 4736, John Whitley, emacs-devel
On 26 Feb 2010, at 00:49, Chong Yidong wrote:
> Francis Devereux <francis@devrx.org> writes:
>
>> David's patch fixes the problem for both John and I, would it be
>> possible for someone to commit it?
>
> Done.
Thanks, the bug is fixed in bzr r99572 (I've tested a 64 bit build of it on OS X 10.6.2).
Francis
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4736: 23.1; ns-antialias-text set to nil has no effect
2010-02-26 0:49 ` Chong Yidong
2010-02-27 20:42 ` Francis Devereux
@ 2010-02-27 20:42 ` Francis Devereux
1 sibling, 0 replies; 15+ messages in thread
From: Francis Devereux @ 2010-02-27 20:42 UTC (permalink / raw)
To: Chong Yidong
Cc: David Reitter, Adrian Robert, John Whitley, 4736, emacs-devel
On 26 Feb 2010, at 00:49, Chong Yidong wrote:
> Francis Devereux <francis@devrx.org> writes:
>
>> David's patch fixes the problem for both John and I, would it be
>> possible for someone to commit it?
>
> Done.
Thanks, the bug is fixed in bzr r99572 (I've tested a 64 bit build of it on OS X 10.6.2).
Francis
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4736: 23.1; ns-antialias-text set to nil has no effect
2010-02-14 16:01 ` Francis Devereux
2010-02-15 23:36 ` John Whitley
@ 2010-02-15 23:36 ` John Whitley
1 sibling, 0 replies; 15+ messages in thread
From: John Whitley @ 2010-02-15 23:36 UTC (permalink / raw)
To: Francis Devereux; +Cc: David Reitter, Adrian Robert, 4736, emacs-devel
On Feb 14, 2010, at 8:01 AM, Francis Devereux wrote:
> On 14 Feb 2010, at 15:38, David Reitter wrote:
>> 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.
>
> Thanks David, works when compiled as 64 bit on OS X 10.6.2.
Second confirmation. I built Emacs.app as 64 bit with David's patch against bzr revno 99498; the setting ns-antialias-text is now correctly observed.
Thanks Francis and David!
-- John
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#4736: 23.1; ns-antialias-text set to nil has no effect
2010-02-14 15:38 ` David Reitter
2010-02-14 16:01 ` Francis Devereux
@ 2010-02-14 16:01 ` Francis Devereux
1 sibling, 0 replies; 15+ messages in thread
From: Francis Devereux @ 2010-02-14 16:01 UTC (permalink / raw)
To: David Reitter; +Cc: Adrian Robert, John Whitley, 4736, emacs-devel
On 14 Feb 2010, at 15:38, David Reitter wrote:
> On Feb 14, 2010, at 8:31 AM, Francis Devereux wrote:
>
>> On 17 Oct 2009, at 13:16, Adrian Robert wrote:
>>
>>> http://emacsbugs.donarmstrong.com/cgi-bin/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.
Thanks David, works when compiled as 64 bit on OS X 10.6.2.
Francis
^ permalink raw reply [flat|nested] 15+ messages in thread