Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hello, I have tried to research this. I have found the built in help system hard to follow and cannot find where this particular problem is answered. I have also tried posting this question to usenet, with no satisfactory response.
I am using Emacs 21.3.1 under FreeBSD 6.1. I want to change the default font size AND the default font type permanently, by making a entry into the .emacs initi file.
Normally, i temporarily change the size AND type of font by holding down shift and left clicking the mouse button. I then get a menu of fonts and always select this:
courier (type)
18 (size)
MY QUESTION:
Please show me precisely what I need to write in the .emacs file in order for the courier (type) and 18 (size) to be made my default font type and size.
Currently, my .emacs file simply has the entry: (set-default-font "9x15"), which is a bit larger, but i do not like the font type. Thats why I need a specific reply to this, if possible.
There are some shortcut names like the "9x15" you are using (also "8x13"), but normally it expects the X font name like this:
-MAKER-FAMILY-WEIGHT-SLANT-WIDTHTYPE-STYLE-PIXELS-HEIGHT-HORIZ-VERT-SPACING-WIDTH-CHARSET
You can run these commands (at least on Linux, probably on FreeBSD too) to see what fonts are on your system:
Code:
xlsfonts ## This displays system fonts
xfd -fn fontname ## This pops up a window displaying it
Here are some that I have tried on my Linux system:
OK, I fired up FreeBSD in VMware, which I hadn't done in some time. This worked. The first line just prints to stdout so you can see you've isolated one font name. The second command pops up a window showing you the font. You can toy with the grep arguments to get different choices.
Thanks, neilcpp, your instructions worked. However...
it now takes quite a while for emacs to show text in a buffer after opening a file. How can I change this, without going back to standard font settings?
it now takes quite a while for emacs to show text in a buffer after opening a file. How can I change this, without going back to standard font settings?
The delay caused by set-default-font can be worked around by adding the following at the beginning of your .emacs file:
(modify-frame-parameters nil '((wait-for-wm . nil)))
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.