help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monospaced and proportional fonts


From: Michael Heerdegen
Subject: Re: Monospaced and proportional fonts
Date: Mon, 25 Jun 2012 23:31:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Hi,

you can use face remapping for that, a feature that was introduced in
Emacs 23.

It works for me to use something like this in the local variable list
of a file:

eval: (face-remap-add-relative 'default :family "DejaVu Sans Condensed" :height 
120)

I.e. to test it for any file, add this to the end of the file:

Local Variables:
eval: (face-remap-add-relative 'default :family "DejaVu Sans Condensed" :height 
120)
End:

I hope that's enough for you to experiment.  See the elisp manual,
Display > Faces, and Variables > File Local Variables.


Michael.


Eddie <penguinismo@almostconnecticut.net> writes:

> I have a line in my .emacs that sets the default font:
>
> (add-to-list 'default-frame-alist '(font . "DejaVu Sans Condensed-12"))
>
> I also have two .org files which I open frequently and for which I'd
> like to have the default font be a monospace font (Deja Vu Sans
> Mono-11 would work just great).
>
> I can pull down the "Options" menu and set the default font from there.
> But that's kind of cumbersome and repetitive. Is it possible to
> permanently apply a monospaced font to just those two files (not all
> my .org files)?
>
> This is Emacs 23.3 on various Linux desktops.
>
> To further complicate things, the full path to these files will change,
> depending on what computer I'm working on; they reside on one
> computer, but sometimes I access them from another computer via a Samba
> share.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]