From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Francis Devereux Newsgroups: gmane.emacs.bugs Subject: bug#4736: 23.1; ns-antialias-text set to nil has no effect Date: Sun, 14 Feb 2010 13:31:19 +0000 Message-ID: References: <3D80FB40-724F-4789-8807-E1C8A8A40375@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1266167498 11275 80.91.229.12 (14 Feb 2010 17:11:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2010 17:11:38 +0000 (UTC) Cc: 4736@emacsbugs.donarmstrong.com, John Whitley , emacs-devel@gnu.org To: Adrian Robert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 14 18:11:23 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ngi00-00028L-Mn for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2010 18:11:15 +0100 Original-Received: from localhost ([127.0.0.1]:54438 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ngho8-0007C4-Iq for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Feb 2010 11:58:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NgfMu-0006H0-5q for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2010 09:22:40 -0500 Original-Received: from [140.186.70.92] (port=56868 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgfMt-0006Gs-KS for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2010 09:22:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NgfMr-0001So-Cm for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2010 09:22:39 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58073) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgfMr-0001Sg-8c for bug-gnu-emacs@gnu.org; Sun, 14 Feb 2010 09:22:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NgfEY-0001wS-0I; Sun, 14 Feb 2010 09:14:02 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Francis Devereux Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Feb 2010 14:14:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 4736 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: Original-Received: via spool by 4736-submit@debbugs.gnu.org id=B4736.12661568117451 (code B ref 4736); Sun, 14 Feb 2010 14:14:01 +0000 Original-Received: (at 4736) by debbugs.gnu.org; 14 Feb 2010 14:13:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgfE2-0001w8-St for submit@debbugs.gnu.org; Sun, 14 Feb 2010 09:13:31 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.171]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgeZQ-0001Pb-2g for 4736@emacsbugs.donarmstrong.com; Sun, 14 Feb 2010 08:31:33 -0500 Original-Received: from jupiter-wifi.repton.int (93-97-163-71.zone5.bethere.co.uk [93.97.163.71]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MdZN2-1NLfHA3JsK-00Pzu2; Sun, 14 Feb 2010 14:31:21 +0100 In-Reply-To: <3D80FB40-724F-4789-8807-E1C8A8A40375@gmail.com> X-Mailer: Apple Mail (2.1077) X-Provags-ID: V01U2FsdGVkX1/T1eqakmOM/kC+T/qn8rkcAEFviRqSzGr3xcT jH+TVXoLjNfVz2i+uv6yufAeirYqLgFxO74yVlLJ+BhlJj8t3u keZFtmJo8RQ7Fxk3WEgIA== X-Mailman-Approved-At: Sun, 14 Feb 2010 09:13:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 14 Feb 2010 09:14:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sun, 14 Feb 2010 11:57:41 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35113 Archived-At: On 17 Oct 2009, at 13:16, Adrian Robert wrote: > http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D4736 >=20 > 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=3D"-arch i386" CFLAGS=3D"-g -O2 -arch i386 -march=3Dcore2" = ../trunk/configure --build=3Di386-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 =3D=3D 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 =3D=3D Qnil || font->size <=3D = 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=3D%d\n", BITS_PER_EMACS_INT); + safe_debug_print (ns_antialias_text); + } =20 CGContextSetTextMatrix (gcontext, fliptf); Output from 64-bit Emacs (the following is repeated many times): *** Enabled anti aliasing, BITS_PER_EMACS_INT=3D64 # Francis