unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [patch] Fix ns-antialias-text in Mac OS for 24.4
@ 2014-10-23  1:31 Scott Wheeler
  2014-10-23 14:15 ` Scott Wheeler
  0 siblings, 1 reply; 2+ messages in thread
From: Scott Wheeler @ 2014-10-23  1:31 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 436 bytes --]

Hi fellows —

In the recent release ns-antialias-text / mac-allow-anti-aliasing were broken for Mac (they have no effect).  I did a binary search through the commits until I pinned it on this and the following commit:

https://gitorious.org/emacs-transition/review6/commit/61cf50507d6564d741c0ec399b6a33fa248669a5

The patch was very simple — it just needs to check the setting again, and is attached for review.

-Scott


[-- Attachment #2: emacs-fix-ns-antialias-text-mac-os.patch --]
[-- Type: application/octet-stream, Size: 759 bytes --]

commit 6ee23077cee8f619edd4c4ffccfdbcf976da6866
Author: Scott Wheeler <scott@directededge.com>
Date:   Thu Oct 23 03:13:14 2014 +0200

    Check to see if the user has explicitly disabled anti-aliasing

diff --git a/src/macfont.m b/src/macfont.m
index 1bb3fb1..55b9a9f 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2763,7 +2763,8 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
       CGFloat advance_delta = 0;
       int y_draw = -s->ybase;
       int no_antialias_p =
-	(macfont_info->antialias == MACFONT_ANTIALIAS_OFF
+	(NILP (ns_antialias_text)
+         || macfont_info->antialias == MACFONT_ANTIALIAS_OFF
 	 || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
 	     && font_size <= macfont_antialias_threshold));
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] Fix ns-antialias-text in Mac OS for 24.4
  2014-10-23  1:31 [patch] Fix ns-antialias-text in Mac OS for 24.4 Scott Wheeler
@ 2014-10-23 14:15 ` Scott Wheeler
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Wheeler @ 2014-10-23 14:15 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Oct 23, 2014, at 3:31 AM, Scott Wheeler <scott.wheeler@gmx.de> wrote:
> 
> In the recent release ns-antialias-text / mac-allow-anti-aliasing were broken for Mac (they have no effect). [...]
> 
> <emacs-fix-ns-antialias-text-mac-os.patch>

After using this a bit, it became clear that when disabling antialiased fonts, turning off synthetic bold is desirable as well.  Patch attached with both changes.

-Scott



[-- Attachment #2: emacs-fix-ns-antialias-text-mac.diff --]
[-- Type: application/octet-stream, Size: 1512 bytes --]

commit c735f7e4af9375bba17e133a0d7b69a79ef604f1
Author: Scott Wheeler <scott@directededge.com>
Date:   Thu Oct 23 15:32:32 2014 +0200

    Disable synthetic bold when antialiased fonts are disabled

diff --git a/src/macfont.m b/src/macfont.m
index ee86d9b..cb2d0be 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2517,6 +2517,7 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size)
       && FONT_SLANT_NUMERIC (entity) == FONT_SLANT_SYNTHETIC_ITALIC)
     macfont_info->synthetic_italic_p = 1;
   if (!(sym_traits & MAC_FONT_TRAIT_BOLD)
+      && !NILP (ns_antialias_text)
       && FONT_WEIGHT_NUMERIC (entity) == FONT_WEIGHT_SYNTHETIC_BOLD)
     macfont_info->synthetic_bold_p = 1;
   if (sym_traits & MAC_FONT_TRAIT_MONO_SPACE)

commit aded58804f19f286a15b46f87f7835919f9c2efc
Author: Scott Wheeler <scott@directededge.com>
Date:   Thu Oct 23 03:13:14 2014 +0200

    Check to see if the user has explicitly disabled anti-aliasing

diff --git a/src/macfont.m b/src/macfont.m
index 69bde9f..ee86d9b 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -2768,7 +2768,8 @@ macfont_draw (struct glyph_string *s, int from, int to, int x, int y,
       CGFloat advance_delta = 0;
       int y_draw = -s->ybase;
       int no_antialias_p =
-	(macfont_info->antialias == MACFONT_ANTIALIAS_OFF
+	(NILP (ns_antialias_text)
+         || macfont_info->antialias == MACFONT_ANTIALIAS_OFF
 	 || (macfont_info->antialias == MACFONT_ANTIALIAS_DEFAULT
 	     && font_size <= macfont_antialias_threshold));
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-23 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23  1:31 [patch] Fix ns-antialias-text in Mac OS for 24.4 Scott Wheeler
2014-10-23 14:15 ` Scott Wheeler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).