unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: Font sources
Date: Fri, 14 Sep 2007 13:01:01 +1000	[thread overview]
Message-ID: <87myvqdk7m.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: mailman.812.1189705707.18990.help-gnu-emacs@gnu.org

"Dave Pawson" <dave.pawson@gmail.com> writes:

> After messing with applications most of the day, I rebooted.
>
> On calling up emacs, I'm missing the fonts.
> I can't find anywhere where it tells me how emacs links
> through to the (presumably X ) font selections.
>
>
> I can run Open office and all the fonts are there.
>
> Emacs tells me
> Warning: no fonts matching
> `-*-fixed-medium-r-normal-*-16-*-*-*-*-*-iso8859-1' available [2
> times]
> Warning: no fonts matching
> `-*-*-medium-r-normal-*-16-*-*-*-*-*-iso8859-1' available
> Warning: no fonts matching `-*-*-*-r-normal-*-16-*-*-*-*-*-iso8859-1' available
> Warning: no fonts matching `-*-*-*-*-normal-*-16-*-*-*-*-*-iso8859-1' available
> Warning: no fonts matching `-*-*-*-*-*-*-16-*-*-*-*-*-iso8859-1'
> available [2 times]
>
>
> How does Emacs link out to the fonts available on the system?
> Is it configured at build time?
> I rebuilt in case anything had changed. No difference.
>
>
Dave,

when running under X, emacs gets its fonts from the X server. Sometimes
these are defined as FontPaths within the xorg.conf file. In some setups,
you have a font server instead or in addition to hard coded font paths. In
this case, you will have something like 
FontPath          "unix/:71000"

There are some restrictions on the types of fonts emacs can use. For
example, I don't think emacs handles font scaling and aliased fonts (though
I think some of the work in the latest CVS version is trying to address
some of these limitations). I should admit that fonts is not an area I know
a lot about - just what I've needed to get what I want. 

The approach I follow to get a font for emacs is as follows -

1. Run xfontsel and select a font that looks about right.

2. Hit the select button to copy the font.

3. run emacs with the -font "-......", using the mouse to paste the font
selected from xfontsel. Don't forget to quote the font string to prevent
your shell from trying to expand the '*' etc. 

4. If I like the font, I then put it into my .Xresources file i.e.
Emacs.font: -........

5. Exit emacs and run xrdb merge .Xresources so that the new emacs font
entry is added to the xrdb database. 

When you next run emacs, it should use that font. 

I also tend to put other settings in the .Xresources file, such as
Emacs.geometry, the default foreground/background colours, pointer colour
and cursor colour. I also tend to turn off the toolbar, tooltips etc. 

You can find a full list of the options in the emacs info manual under the
section on X resources. Also note that you can select from a range of
miscellaneous and fixed fonts (as well as font sets) while running emacs by
holding down shift and hitting the left mouse button. 

Also note that if you find when running xfontsel that you have no fonts
showing up or only a very few fonts, it is an indicator that your X server
is having trouble getting font information. If your running a font server,
it generally indicates the font server is either not working or cannot be
reached (one of the reasons to run a font server is that it can be on a
different host - some places will set up a special font server with all the
necessary fonts to save everybody from having to maintain their own fonts
and to save disk space etc). The xrdb utility can be very useful in
tracking down problems. For example, you can use it to see what X believes
your font path is. Another useful place to check for clues to resolve
issues is the /var/log/Xorg.log file (its name may vary a little depending
ond distro and setup).

HTH

Tim


-- 
tcross (at) rapttech dot com dot au

       reply	other threads:[~2007-09-14  3:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.812.1189705707.18990.help-gnu-emacs@gnu.org>
2007-09-14  3:01 ` Tim X [this message]
2007-09-14 12:37   ` Font sources Dave Pawson
2007-09-14 15:28     ` Peter Dyballa
     [not found]   ` <mailman.863.1189773461.18990.help-gnu-emacs@gnu.org>
2007-09-15  3:36     ` Tim X
2007-09-15  8:16       ` Dave Pawson
     [not found]       ` <mailman.895.1189844209.18990.help-gnu-emacs@gnu.org>
2007-09-15 10:40         ` Tim X
2007-09-13 17:48 Dave Pawson
2007-09-13 20:26 ` Mathias Megyei

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=87myvqdk7m.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /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).