truetype fonts in x11, wrong metrics?
- From: "BALLABIO GERARDO" <GERARDO.BALLABIO@xxxxxxxx>
- Date: Mon, 30 Apr 2007 09:38:22 +0200
Hi all,
I've recently switched from Sarge to Etch (I've decided to do a
reinstall, not an upgrade, because I also wanted to repartition the hard
disk) and in the last few days I've been restoring my customizations.
I've run into a problem with fonts. In Sarge I had configured Emacs to
use the same font as the Gnome Terminal, and I want to do the same thing
in Etch. The font family Gnome is using is "DejaVu" (package
ttf-dejavu). As this is a TrueType font, it isn't immediately available
from Emacs: it has to be registered first as an X11 font. I had been
able to do that in Sarge by following directions from this page:
http://www.paulandlesley.org/linux/xfree4_tt.html (specifically, section
4.2) and tried to do the same in Etch. Basically the procedure is:
1. go to the directory where the TrueType fonts are stored (that is
/usr/share/fonts/truetype/ttf-dejavu)
2. run ttmkfdir (creates fonts.scale)
3. run mkfontdir (creates fonts.dir)
4. in /etc/X11/xorg.conf add the following line to Section "Files":
FontPath /usr/share/fonts/truetype/ttf-dejavu
5. restart the X server
(of course must be done as root)
So this worked in Etch too: after the procedure, "xlsfonts | grep
dejavu" shows quite a lot of fonts. The one I want seems to be
"-misc-dejavu sans mono-medium-r-normal--15-150-75-75-m-0-iso10646-1"
(in the Gnome font panel it's listed as "Monospace, 12 pt"). But
strangely, when I run Emacs with this font, the text window isn't
dimensioned correctly: it should be 80 characters wide, but only 72 fit
within. There's also some extra spacing between lines. See attached
screenshot: the Gnome Terminal window shows what it should look like.
I guess that Emacs doesn't get the font metrics correctly. I don't know
which I should blame -- the font files, Emacs or X-Windows. Anyway, does
anyone know what I could do to fix this?
Please Cc: me, I'm not subscribed.
Thanks everybody
Gerardo
Attachment:
screenshot.png
Description: screenshot.png
- Follow-Ups:
- Re: truetype fonts in x11, wrong metrics?
- From: Liam O'Toole
- Re: truetype fonts in x11, wrong metrics?
- Prev by Date: Re: reporting problems with unstable
- Next by Date: grub and rootfs as LVM
- Previous by thread: reporting problems with unstable
- Next by thread: Re: truetype fonts in x11, wrong metrics?
- Index(es):
Relevant Pages
- Re: truetype fonts in x11, wrong metrics?
... In Sarge I had configured Emacs to ... thing in Etch. ... The
font family Gnome is using is "DejaVu" (package ... available from Emacs: it has
to be registered first as an X11 font. ... (Debian-User) - Can you identify this font?
... I'm trying to get a pattern to etch some L&NWR number plates, ...
Has anyone got a TT font that I ... (uk.rec.models.engineering) - Can you identify this font?
... I'm trying to get a pattern to etch some L&NWR number plates, but can't find
the font I need for the numerals. ... (uk.rec.models.engineering) - Can you identify this font?
... I'm trying to get a pattern to etch some L&NWR number plates, ... find
the font I need for the numerals. ... Has anyone got a TT font that I ...
(uk.rec.models.engineering) - Re: How do I edit UTF-8 encoded files with Emacs?
... > files contains German quotation marks, ... I am using GNU Emacs
right now and don't appear to me to be having any ... and you have LANG set to a UTF-8 font
and you ... > eMails, with Emacs as editor. ... (Debian-User)