From: floyd@barrow.com (Floyd L. Davidson)
Subject: Re: How can I determine what the default font it?
Date: Thu, 26 Feb 2004 02:25:20 -0900 [thread overview]
Message-ID: <87ptc2w09r.fld@barrow.com> (raw)
In-Reply-To: mailman.530.1077761317.340.help-gnu-emacs@gnu.org
exits funnel <exitsfunnel@yahoo.com> wrote:
>Hello,
>
>I've just upgraded to emacs 21.3.1 from emacs 19.7(?)
>running on RedHat Linux. It works great but for one
>immediate problem. The default font size is much
>smaller and I can barely read it. I've done a bit of
>research (I'm pretty new to Linux and well as emacs)
>on changing the font size but I have a few quick
>questions. First of all it seems I can do this either
>by modifying my .emacs file or by modifying
>.Xdefaults. Which approach is better?
You'll want to note that basically all of this applies not only
to Emacs, but to xterms as well, where you will probably have
exactly the same problem. (I use a 1333x1000 resolution screen,
and have fits trying to work out fonts that provide readable
text in windows of the right size.)
Probably .Xdefaults is best, because that relates closely to the
X configuration (which is where the screen resolution is
chosen). You can use the same ~/.emacs file, regardless of the
X configuration if you specify font sizes with the X
configuration rather than the Emacs configuration.
There still seem to be lots of "gotchas", and I haven't worked
it out well enough for GNU Emacs (mostly because I normally use
XEmacs, and they don't work quite the same). In particular,
it is necessary to go through the faces customization menu
and set fonts. And I've found that some fonts simply can't
be manipulated by GNU Emacs (for reasons that I do not at all
understand). For example, I rather like, in XEmacs, using the
-misc-fixed-medium-r-semicondensed fonts. But GNU Emacs can't
scale them, and attempts to do so result in very small sizes.
One comment on testing changes to ~/.Xdefaults before going on
to the rest of this. To test a new configuration you can use
xrdb to effect the new configuration, but there are two ways
to do it.
xrdb -merge .Xdefaults
is usually recommended, but it will not delete something you
have removed from .Xdefaults. It will add, and it will change,
but no deletions. But,
xrdb .Xdefaults
will replace the existing definitions with the new definitions,
which means something that is not defined in the new file will
not exist after that command. Hence it will delete what you've
removed, but it also deletes everything from any other
initialization files. I.e., it's good for testing, but you'll
want to restart X when you are done.
>I'm assuming
>if I change .Xdefaults this will affect other programs
>besides emacs.
Only if you want it to. For example,
*font: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1
will affect virtually everything ending in "font" that is not
otherwise specifically set, and hence is probably not a good
idea. There are two ways to be specific,
Emacs*font: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1
Emacs.font: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1
will both affect either Emacs or XEmacs, but nothing else. While
XEmacs*font: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1
XEmacs.font: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1
will both affect only XEmacs and not GNU Emacs.
The difference between using the '*' wildcard or not, is that
the wild card will set all Emacs resources that end in "font",
that are not more specifically defined, while using the "."
specifies one and only one resource. Hence, if you have only
Emacs.font: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1
you might have not set several fonts, and they will default to
something like "fixed", which is exceedingly small and moreover
Emacs can neither scale it or find variations for such as
bold, italic, or underline.
But if you set
Emacs*font: 9x15
you're screwed too, because everything is set to a font that
Emacs cannot manipulate.
However, I don't know that Emacs has any resource ending in
"font" other than the default, so it (may or) may not make any
difference at all. But definitely with other programs that is
significant... (for colors and other resources as well as
fonts).
>My other question is how can I find
>out what font emacs is currently displaying? Thanks
>in advance for any replies.
You can do "M-x list-faces-display" which will give you
a line of text for each face that is defined. It gives you
the variable for that particular face, and you can select
from that buffer any of the face names and change the font
or other properties. For example, with some fonts being
too small (once you have the basic defaults set in .Xdefaults),
you can browse the list and change the ones that are hard
to read.
There are some strange things happen with fonts in GNU Emacs
that you may or may not bothered by. One is the way tabs are
offset. I have the following in my .Xdefaults file, and used it
for checking the results of font changes.
#
# When playing with fonts for GNU Emacs, the tabs do not
# necessarily line up where they should when fonts are scaled.
# The following chart uses tabs between the 'T' characters, and
# spaces between the '|' characters. They should line up
# exactly...
#
# T T T T T T T T T T
#1234567890123456789012345678901234567890123456789012345678901234567890123456789
# | | | | | | | | | |
Note the comment about tabs between the "T" characters on the
chart. If, between my writing this and you reading it, they get
changed to spaces, it won't provide the needed value...
A couple recommendations. Change the size to suit your needs,
but for menus and pop-ups the proportional spacing with a
helvetica font is much nicer. I use bold to make it more readable
too. YMMV, of course.
#
# Font menus
#
Emacs*menubar*font: -*-helvetica-bold-r-*-*-16-*-*-*-*-*-iso8859-*
Emacs*popup*font: -*-helvetica-bold-r-*-*-16-*-*-*-*-*-iso8859-*
Here is what I like for the default font. Unfortunately, GNU Emacs
(unlike XEmacs) can't seem to scale this font.
Emacs.font: -misc-fixed-medium-r-semicondensed-*-25-*-100-*-*-*-iso8859-1
Here is what I set for attribute fonts.
Emacs.default.attributeFont: -*-courier-*-*-*-*-23-*-*-*-*-*-iso8859-1
Emacs.bold.attributeFont: -*-courier-bold-r-*-*-23-*-*-*-*-*-iso8859-1
Emacs.italic.attributeFont: -*-courier-medium-r-*-*-23-*-*-*-*-*-iso8859-1
Emacs.bold-italic.attributeFont: -*-courier-bold-r-*-*-23-*-*-*-*-*-iso8859-1
(Note that I don't use the oblique font for italics, because it is
just too ugly to look at and hard to read.)
However, despite having set those in ~/.Xdefaults, I'm pretty
sure that I've changed every one of them using the customize
menu, and therefore that is overridden by custom-set-faces
written to ~/.emacs.el. The problem is that while the courier
fonts do scale, it is at intervals and is not a continuous
allowable range, and the trick is to get a size to most closely
match the default font's size.
--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@barrow.com
next prev parent reply other threads:[~2004-02-26 11:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.530.1077761317.340.help-gnu-emacs@gnu.org>
2004-02-26 4:45 ` How can I determine what the default font it? V. L. Simpson
2004-02-28 0:42 ` exits funnel
2004-02-26 11:25 ` Floyd L. Davidson [this message]
2004-02-27 0:16 ` Jason Rumney
2004-02-27 0:44 ` Floyd L. Davidson
2004-02-27 12:23 ` Kai Grossjohann
2004-02-27 15:54 ` Floyd L. Davidson
2004-02-29 16:58 ` Kai Grossjohann
2004-02-29 19:58 ` Floyd L. Davidson
2004-02-29 21:54 ` Jason Rumney
[not found] <mailman.718.1077929760.340.help-gnu-emacs@gnu.org>
2004-02-28 8:13 ` Robert Marshall
2004-02-28 14:27 ` V. L. Simpson
2004-03-01 19:03 ` Kevin Rodgers
2004-02-26 2:06 exits funnel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ptc2w09r.fld@barrow.com \
--to=floyd@barrow.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).