Discussion Board
Go to the previous messageGo to the following message
Current Forum: Tip Forum
Date: Mon Sep 24 2001 12:51 pm
Author: Lee, Peter <petel@cmu.edu>
Subject: Re: text font

You can set the default appearance parameters for all frames by adding attributes to the "default-frame-alist". If you take a look at the sample .emacs file I made available, you'll see a statement that starts off as

(setq default-frame-alist
'((width . 80)
(height . 50)
...

and so on. Each (xxx . yyy) pair is an attribute-value pair, giving the appearance attribute (such as height, cursor-color, etc) and corresponding default value. For the font, you can use the attribute called "font":

(font . )

Now, the question is, how to get the name of a good font? The answer is different on different operating systems. The unix machines have different fonts than the Windows and Mac machines. And X windows software has its own set of fonts, too.

If you are running Emacs on a Unix machine, you can go to the "Mule" pull-down menu and choose the "Set Font/Fontset" menu. Try different fonts until you find one that is happy. Then, to get its name, type the command "M-x list-fontset". This will give you the complete name of the font that you can put into your .emacs file.

If you are running Emacs on a Windows machine, you can go to an empty buffer and type

(insert (print1-to-string (w32-select-font))

and then type the command "M-x eval-buffer". This will run a small dialog that let's you look at each available Windows font and try them out. When you find one you like, click the "OK" button and you will get the font name put into the empty buffer, ready for cutting-and-pasting into your .emacs file.


Post response

Go to the previous messageGo to the following message
Current Thread Detail:
text font      Shi, Ying      Mon Sep 24 2001 10:38 am       
Re: text font      Lee, Peter      Mon Sep 24 2001 12:51 pm       
Re: text font      Shi, Ying      Mon Oct 1 2001 4:45 pm       
Re: text font      Lee, Peter      Mon Oct 1 2001 9:37 pm       
Re: text font      Shi, Ying      Mon Oct 1 2001 11:27 pm       
Re: text font      Lee, Peter      Tue Oct 2 2001 9:26 pm       
Re: text font      Shi, Ying      Tue Oct 2 2001 10:50 pm       
Re: text font      Chen, Richard      Wed Oct 3 2001 10:36 am       
Re: text font      Scherlis, William L.      Wed Oct 3 2001 8:24 am       

Back to previous screen