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

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

Re: Font sources


From: Tim X
Subject: Re: Font sources
Date: Fri, 14 Sep 2007 13:01:01 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

"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 via email to

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