unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Disabling ATSUI on OS X
@ 2007-03-26 12:48 Julian Scheid
  2007-03-26 13:10 ` Miles Bader
  0 siblings, 1 reply; 8+ messages in thread
From: Julian Scheid @ 2007-03-26 12:48 UTC (permalink / raw)
  To: emacs-devel

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

In Emacs HEAD it is not possible to disable ATSUI font rendering on
Mac OS X at run-time or at compile-time without hacking the source.

   $ grep -re 'define[[:space:]]\+USE_ATSUI' emacs
   emacs/src/macgui.h:#define USE_ATSUI 1
   $

IMHO, and personal preference nonwithstanding, rendering without ATSUI
should at least be an option at compile-time.  I've attached an image
to demonstrate that it delivers a crispness that is not matched by its
ATSUI counterparts (top: USE_ATSUI=1, mac-allow-anti-aliasing=t;
center: USE_ATSUI=1, mac-allow-anti-aliasing=nil; bottom: USE_ATSUI=0;
all using "-*-Monaco-*-100-*").

In the spirit of offering choices I would suggest introducing a
--disable-atsui configure option, and I'd be happy to send over a
corresponding patch I have sitting here.  It just defines USE_ATSUI to
be 0 if the option is specified.

Unfortunately I don't have knowledge about OS X font rendering APIs or
Emacs source internals, or I would be preparing a patch that allows
switching the rendering engine at run-time.

Julian Scheid

[-- Attachment #2: atsui-comparison.png --]
[-- Type: image/png, Size: 584 bytes --]

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Disabling ATSUI on OS X
  2007-03-26 12:48 Disabling ATSUI on OS X Julian Scheid
@ 2007-03-26 13:10 ` Miles Bader
  2007-03-26 13:21   ` Julian Scheid
  2007-03-26 13:34   ` Julian Scheid
  0 siblings, 2 replies; 8+ messages in thread
From: Miles Bader @ 2007-03-26 13:10 UTC (permalink / raw)
  To: Julian Scheid; +Cc: emacs-devel

Julian Scheid <julian@sektor37.de> writes:
> I've attached an image to demonstrate that it delivers a crispness
> that is not matched by its ATSUI counterparts (top: USE_ATSUI=1,
> mac-allow-anti-aliasing=t; center: USE_ATSUI=1,
> mac-allow-anti-aliasing=nil; bottom: USE_ATSUI=0; all using
> "-*-Monaco-*-100-*").

Does atsui not have a setting equivalent to freetype's "favor contrast"
setting (I don't know the official name of this, it's something you get
in the gnome font-settings dialog)?

With freetype that setting yields extremely "crisp" results without
actually turning off antialiasing:  it essentially aligns all
horizontal/vertical lines to pixel boundaries (and tries to make their
width an integer multiple) but uses subtle anti-aliasing for rounded
parts and diagonal lines; it's far superior to just turning off
anti-aliasing altogether in freetype, and is my preferred setting when
using a LCD.

-Miles
-- 
Suburbia: where they tear out the trees and then name streets after them.

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

* Re: Disabling ATSUI on OS X
  2007-03-26 13:10 ` Miles Bader
@ 2007-03-26 13:21   ` Julian Scheid
  2007-03-26 14:07     ` YAMAMOTO Mitsuharu
  2007-03-26 13:34   ` Julian Scheid
  1 sibling, 1 reply; 8+ messages in thread
From: Julian Scheid @ 2007-03-26 13:21 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

Miles Bader wrote:
 > Does atsui not have a setting equivalent to freetype's "favor
 > contrast" setting (I don't know the official name of this, it's
 > something you get in the gnome font-settings dialog)?

Thanks for the heads-up, but as far as I'm aware the only control I
have over text rendering in OS X is the "turn off font smoothing for
font sizes N and smaller" setting in the Appearance panel in System
Preferences, and that works on a system-wide level regardless of which
font is affected and whether we're talking proportional or fixed
fonts.

Now, cranking that setting up makes lots of formerly nice-looking text
go all crumbly.

I'm really happy with how OS X renders text, it's just in Emacs that I
would prefer the crisper display. (My terminal of choice, GLterm,
seems to override that setting as well.)

Julian

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

* Re: Disabling ATSUI on OS X
  2007-03-26 13:10 ` Miles Bader
  2007-03-26 13:21   ` Julian Scheid
@ 2007-03-26 13:34   ` Julian Scheid
  1 sibling, 0 replies; 8+ messages in thread
From: Julian Scheid @ 2007-03-26 13:34 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

Miles Bader wrote:
 > With freetype that setting yields extremely "crisp" results without
 > actually turning off antialiasing: it essentially aligns all
 > horizontal/vertical lines to pixel boundaries (and tries to make
 > their width an integer multiple) but uses subtle anti-aliasing for
 > rounded parts and diagonal lines; it's far superior to just turning
 > off anti-aliasing altogether in freetype, and is my preferred
 > setting when using a LCD.

Sorry, I didn't address this part of your reply. There is a
corresponding setting in OS X, "Font smoothing style", that appears to
do something similar.  And maybe it's just me, but when it comes to
editing text with fixed-size fonts I'd rather go with no anti-aliasing
at all.  I'm not asking for changing any defaults, it would just be
nice to have the option.

Julian

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

* Re: Disabling ATSUI on OS X
  2007-03-26 13:21   ` Julian Scheid
@ 2007-03-26 14:07     ` YAMAMOTO Mitsuharu
  2007-03-26 15:15       ` Stefan Monnier
  2007-03-27  2:04       ` Julian Scheid
  0 siblings, 2 replies; 8+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-03-26 14:07 UTC (permalink / raw)
  To: julian; +Cc: emacs-devel

>>>>> On Mon, 26 Mar 2007 22:48:55 +1000, Julian Scheid <julian@sektor37.de> said:

> In Emacs HEAD it is not possible to disable ATSUI font rendering on
> Mac OS X at run-time or at compile-time without hacking the source.

>    $ grep -re 'define[[:space:]]\+USE_ATSUI' emacs
>    emacs/src/macgui.h:#define USE_ATSUI 1
>    $

> IMHO, and personal preference nonwithstanding, rendering without ATSUI
> should at least be an option at compile-time.

"#define USE_ATSUI 1" in macgui.h is surrounded by "#ifndef
USE_ATSUI", so at least you can pass "-DUSE_ATSUI=0" via CFLAGS.

> In the spirit of offering choices I would suggest introducing a
> --disable-atsui configure option, and I'd be happy to send over a
> corresponding patch I have sitting here.  It just defines USE_ATSUI to
> be 0 if the option is specified.

That's not necessary.  Non-ATSUI-compatible (Font Manager) fonts are
still available even if ATSUI is enabled at the compile time.  See the
"Mac Font Specs" node in the Emacs info.

>>>>> On Mon, 26 Mar 2007 23:21:45 +1000, Julian Scheid <julian@sektor37.de> said:

> Thanks for the heads-up, but as far as I'm aware the only control I
> have over text rendering in OS X is the "turn off font smoothing for
> font sizes N and smaller" setting in the Appearance panel in System
> Preferences, and that works on a system-wide level regardless of which
> font is affected and whether we're talking proportional or fixed
> fonts.

That's not necessarily a system-wide level setting.  You can specify
it as a application-specific setting like

  $ defaults write org.gnu.Emacs AppleAntiAliasingThreshold 100

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

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

* Re: Disabling ATSUI on OS X
  2007-03-26 14:07     ` YAMAMOTO Mitsuharu
@ 2007-03-26 15:15       ` Stefan Monnier
  2007-03-28  8:25         ` YAMAMOTO Mitsuharu
  2007-03-27  2:04       ` Julian Scheid
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2007-03-26 15:15 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: julian, emacs-devel

> That's not necessarily a system-wide level setting.  You can specify
> it as a application-specific setting like

>   $ defaults write org.gnu.Emacs AppleAntiAliasingThreshold 100

Interesting.  Could it be added to the Emacs manual?


        Stefan

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

* Re: Disabling ATSUI on OS X
  2007-03-26 14:07     ` YAMAMOTO Mitsuharu
  2007-03-26 15:15       ` Stefan Monnier
@ 2007-03-27  2:04       ` Julian Scheid
  1 sibling, 0 replies; 8+ messages in thread
From: Julian Scheid @ 2007-03-27  2:04 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: emacs-devel

YAMAMOTO Mitsuharu wrote:
>>>>>> On Mon, 26 Mar 2007 23:21:45 +1000, Julian Scheid <julian@sektor37.de> said:
> 
>> Thanks for the heads-up, but as far as I'm aware the only control I
>> have over text rendering in OS X is the "turn off font smoothing for
>> font sizes N and smaller" setting in the Appearance panel in System
>> Preferences, and that works on a system-wide level regardless of which
>> font is affected and whether we're talking proportional or fixed
>> fonts.
> 
> That's not necessarily a system-wide level setting.  You can specify
> it as a application-specific setting like
> 
>   $ defaults write org.gnu.Emacs AppleAntiAliasingThreshold 100

Ah, that works! I wasn't aware of that setting, thanks a lot.

I agree with Stefan Monnier that this would ideally be mentioned
somewhere in the docs.

I'm going to add it on the Emacs Wiki for now, apparently there are
other people who are not aware of it:
<http://www.emacswiki.org/cgi-bin/emacs-en/CarbonEmacsPackage#toc5>

Thanks again,

Julian

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

* Re: Disabling ATSUI on OS X
  2007-03-26 15:15       ` Stefan Monnier
@ 2007-03-28  8:25         ` YAMAMOTO Mitsuharu
  0 siblings, 0 replies; 8+ messages in thread
From: YAMAMOTO Mitsuharu @ 2007-03-28  8:25 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: julian, emacs-devel

>>>>> On Mon, 26 Mar 2007 11:15:53 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:

>> That's not necessarily a system-wide level setting.  You can specify
>> it as a application-specific setting like

>> $ defaults write org.gnu.Emacs AppleAntiAliasingThreshold 100

> Interesting.  Could it be added to the Emacs manual?

I added some description about it to the info.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

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

end of thread, other threads:[~2007-03-28  8:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-26 12:48 Disabling ATSUI on OS X Julian Scheid
2007-03-26 13:10 ` Miles Bader
2007-03-26 13:21   ` Julian Scheid
2007-03-26 14:07     ` YAMAMOTO Mitsuharu
2007-03-26 15:15       ` Stefan Monnier
2007-03-28  8:25         ` YAMAMOTO Mitsuharu
2007-03-27  2:04       ` Julian Scheid
2007-03-26 13:34   ` Julian Scheid

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).