From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Logie Newsgroups: gmane.emacs.bugs Subject: bug#17534: AppleAntiAliasingThreshold default doesn't seem to work Date: Mon, 7 Jul 2014 16:17:42 +0100 Message-ID: <20140707153416.1eefa589c4@7ac8e35ad8ee6e6> References: <1400598479.44817.YahooMailNeo@web163403.mail.gq1.yahoo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sdtB3X0nJg68CQEu" X-Trace: ger.gmane.org 1404747687 8043 80.91.229.3 (7 Jul 2014 15:41:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Jul 2014 15:41:27 +0000 (UTC) To: 17534@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 07 17:41:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X4B2d-0003zS-I7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Jul 2014 17:41:19 +0200 Original-Received: from localhost ([::1]:51358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4B2d-0004C5-3z for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Jul 2014 11:41:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4B2T-00043C-3d for bug-gnu-emacs@gnu.org; Mon, 07 Jul 2014 11:41:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4B2N-00084l-4I for bug-gnu-emacs@gnu.org; Mon, 07 Jul 2014 11:41:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4B2M-00084a-Kt for bug-gnu-emacs@gnu.org; Mon, 07 Jul 2014 11:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X4B2M-0007ri-56 for bug-gnu-emacs@gnu.org; Mon, 07 Jul 2014 11:41:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <1400598479.44817.YahooMailNeo@web163403.mail.gq1.yahoo.com> Resent-From: David Logie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Jul 2014 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17534 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17534-submit@debbugs.gnu.org id=B17534.140474764730199 (code B ref 17534); Mon, 07 Jul 2014 15:41:02 +0000 Original-Received: (at 17534) by debbugs.gnu.org; 7 Jul 2014 15:40:47 +0000 Original-Received: from localhost ([127.0.0.1]:46136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4B23-0007qu-6O for submit@debbugs.gnu.org; Mon, 07 Jul 2014 11:40:47 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58096) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X4Afq-00077Y-JF for 17534@debbugs.gnu.org; Mon, 07 Jul 2014 11:17:51 -0400 Original-Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 0039A2153B for <17534@debbugs.gnu.org>; Mon, 7 Jul 2014 11:17:45 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Mon, 07 Jul 2014 11:17:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=acme.pm; h=date :from:to:subject:message-id:mime-version:content-type; s=mesmtp; bh=Oe6A9hveePWNpoq3d9IiGe60GbU=; b=tjls/xUa0a7LHUEuq6UfwgsyPjbT 6vrPeeIEWDVGHxIkewWyYg+QShE/8IxB2TFO79L1mwScp37d+E9+TZC2Gi0zJkty RhRlWFHY+CNU+/mwNiSSudsvr2iuvFqfzhTpA7arvIk+cpbBS1wlhqvulYRRWYR2 z9HThQsLfvbuGw8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :mime-version:content-type; s=smtpout; bh=Oe6A9hveePWNpoq3d9IiGe 60GbU=; b=shcqngX9IphwxmZEZ4KmHPAWNCXLdXWVM8xQ1ghgocn75kO2uRtpSu fwQU5icYRWpkg0hBRXC82JdOd39OeSQ/kvf1yNYuzwOK36m6Wz11GeRBFh8Yml5H +CnAjeMpt0MaS0YBJjZGiiknZQjGRenqHNZNPWGiyiSK/ta6cUHok= X-Sasl-enc: hZuD3zfAxgzbb6UbyF7/b9AIL2Nohj10Lw3Wd+sH2OYR 1404746265 Content-Disposition: inline X-Mailman-Approved-At: Mon, 07 Jul 2014 11:40:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91279 Archived-At: --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This bug seems to have been introduced in r114295. A build from r114294 does not have the issue while a build from r114296 does. Looking at the Mac port, I *think* a call to `macfont_update_antialias_threshold()` has been missed somewhere. I managed to cobble together a patch that works for me (see attached) but I'm sure a more correct solution exists. --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="17534-antialias.patch" diff --git a/src/macfont.h b/src/macfont.h index 8b45135..7421cd6 100644 --- a/src/macfont.h +++ b/src/macfont.h @@ -144,4 +144,5 @@ typedef const struct _EmacsScreenFont *ScreenFontRef; /* opaque */ extern void mac_register_font_driver (struct frame *f); extern void *macfont_get_nsctfont (struct font *font); +extern void macfont_update_antialias_threshold (void); diff --git a/src/macfont.m b/src/macfont.m index 82ee54c..024847b 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -728,7 +728,7 @@ static const struct static CGFloat macfont_antialias_threshold; -static void +void macfont_update_antialias_threshold (void) { int threshold; diff --git a/src/nsterm.m b/src/nsterm.m index f2eeeda..753afe9 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4277,6 +4277,12 @@ ns_term_init (Lisp_Object display_name) ns_default ("AppleAntiAliasingThreshold", &tmp, make_float (10.0), make_float (6.0), YES, NO); ns_antialias_threshold = NILP (tmp) ? 10.0 : XFLOATINT (tmp); + +#ifdef NS_IMPL_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 + macfont_update_antialias_threshold(); +#endif +#endif } { --sdtB3X0nJg68CQEu--