Vince
Vince

Reputation: 3395

Turn off anti-alias for font in Emacs 23

How to I disable anti-aliasing for fonts in the Windows version of Emacs 23?

Thanks.

Upvotes: 8

Views: 9826

Answers (4)

gavenkoa
gavenkoa

Reputation: 48753

Never have run Mac OS X, so usable only for Linux + Windows:

(defvar my-preferred-font
  (cond
   ((eq window-system 'x)
    "-misc-fixed-medium-r-normal--14-*-*-*-c-*-iso10646-1")
   ((eq window-system 'w32)
    "Courier New-10:antialias=none")
   (t nil)))
(when my-preferred-font
  (set-frame-font my-preferred-font)
  (set-fontset-font "fontset-default" 'latin my-preferred-font)
  (set-fontset-font "fontset-default" 'phonetic my-preferred-font)
  (set-fontset-font "fontset-default" 'cyrillic my-preferred-font)
  (set-fontset-font "fontset-default" 'greek my-preferred-font))

Whose uses only ASCII it is enough to follow official suggestion:

(add-to-list 'default-frame-alist '(font . "Courier New-10:antialias=none"))

I work with cyrillic, greek and IPA texts so need to define defaults for fontsets...

Upvotes: 0

Lri
Lri

Reputation: 27613

If others were searching for how to disable anti-aliasing in OS X, you can run

defaults write org.gnu.Emacs AppleAntiAliasingThreshold 999

Upvotes: 5

nondeterministic
nondeterministic

Reputation: 521

As I couldn't find a satisfactory answer to this one for a long time, I thought it wouldn't hurt to add this link to this discussion, as the above does not generally work on Linux:

http://keyboardconnoisseur.blogspot.com/2011/04/turning-off-antialiasing-for-specific.html

The problem is that under Linux, emacs doesn't seem to be doing a lot of font handling at all, and you need to disable the antialiasing elsewhere.

Upvotes: 7

Carmine Paolino
Carmine Paolino

Reputation: 2849

You can specify the antialias=none option for your fonts, as stated in GNU Emacs Manual

Upvotes: 10

Related Questions