all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Scott Wheeler <scott.wheeler@gmx.de>
To: emacs-devel@gnu.org
Subject: Re: [patch] Fix ns-antialias-text in Mac OS for 24.4
Date: Thu, 23 Oct 2014 16:15:40 +0200	[thread overview]
Message-ID: <C5E1937C-229F-462E-8B3F-36C433B6811A@gmx.de> (raw)
In-Reply-To: <2C5AA177-0F30-418C-ACA3-11BFA9E76E73@gmx.de>

[-- 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));
 

      reply	other threads:[~2014-10-23 14:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C5E1937C-229F-462E-8B3F-36C433B6811A@gmx.de \
    --to=scott.wheeler@gmx.de \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.