Emacs font doesn't match my Gnome font setting

Bug #13966 reported by Johan Walles
10
Affects Status Importance Assigned to Milestone
gnome-control-center
Invalid
Undecided
Unassigned
control-center (Ubuntu)
Invalid
Wishlist
Ubuntu Desktop Bugs

Bug Description

I have set a fixed width font in Gnome Control Center.

When I start Emacs, it uses another font. I expected Emacs to use my preferred
font.

If I do "xrdb -query | grep -i emacs" I don't see anything about any font setting.

According to the Emacs manual at
"http://www.delorie.com/gnu/docs/emacs/emacs_537.html", the resource to set
should be:

"
emacs.font: foo
"

Revision history for this message
Matt Zimmerman (mdz) wrote :

emacs isn't a GNOME application; it doesn't respect GNOME preferences

Revision history for this message
Johan Walles (walles) wrote :

Gnome Control Center sets a bunch of Emacs X resources.

So since the Gnome Control Center affects other parts of Emacs' look-and-feel,
it should affect the font selection as well.

Revision history for this message
Johan Walles (walles) wrote :

I've been researching this for a bit. The X resources are set by the
gnome-settings-daemon. It currently sets colors, but it's obvious from looking
at /etc/gnome/config/Emacs.ad (for example) that it was intended to set fonts as
well.

GConf provides information about what fonts should be used in the following keys:
/desktop/gnome/interface/monospace_font_name
/desktop/gnome/interface/font_name

Those keys has values looking something like this (example from my system):
"Monospace 8"
"Sans 9"

Font names in X resources need to be set as traditional X font names (random
example):
"-bitstream-bitstream vera sans mono-bold-r-normal--17-120-75-100-m-0-iso8859-15"

So the question is how to convert from something like "Monospace 8" to something
like "-bitstream-bitstream vera sans
mono-bold-r-normal--17-120-75-100-m-0-iso8859-15".

As my knowledge of X's font handling is close to zero, this is where I ran into
problems (help appreciated).

Any idea about how to do the conversion? Or is it even possible? AFAIU, GNOME
uses Pango for font rendering, which can potentially use several different fonts
to be able to provide as many glyphs as possible. And X's traditional font
naming doesn't really support that. Any opinion about whether this can be done
at all?

Revision history for this message
Daniel Holbach (dholbach) wrote :

Confirming the bug. Somebody of the team should probably take this upstream.

Changed in control-center:
assignee: seb128 → desktop-bugs
status: Unconfirmed → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

not really a GNOME bug and the desktop team is too small to work on it, could also be a an emacs request

Changed in control-center:
status: Unconfirmed → Rejected
importance: Medium → Wishlist
status: Confirmed → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.