GNU bug report logs -
#6526
24.0.50; Font X resouce is ignored
Previous Next
Reported by: Kenichi Handa <handa <at> m17n.org>
Date: Mon, 28 Jun 2010 08:16:01 UTC
Severity: normal
Found in version 24.0.50
Done: Jan Djärv <jan.h.d <at> swipnet.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6526 in the body.
You can then email your comments to 6526 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6526
; Package
emacs
.
(Mon, 28 Jun 2010 08:16:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kenichi Handa <handa <at> m17n.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 28 Jun 2010 08:16:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
After the following change:
2010-06-22 Jan Djärv <jan.h.d <at> swipnet.se>
* xfns.c (x_default_font_parameter): Try to open font from system
before using it (bug#6478). Rename got_from_gconf to got_from_system.
Font X resource settings are ignored. For instnace, I have
these settinggs:
Emacs.Font: fontset-24
Emacs.Fontset-0: -etl-*-medium-r-normal-*-14-*-*-*-*-*-fontset-14
Emacs.Fontset-1: -etl-*-medium-r-normal-*-18-*-*-*-*-*-fontset-18
Emacs.Fontset-2: -etl-*-medium-r-normal-*-20-*-*-*-*-*-fontset-20
Emacs.Fontset-3: -etl-*-medium-r-normal-*-24-*-*-*-*-*-fontset-24
Before the above change, Emacs uses the font
-etl-fixed-medium-r-normal--24-...-iso8859-1, but now it
uses the font "DejaVu Sans Mono".
---
Kenichi Handa
handa <at> m17n.org
In GNU Emacs 24.0.50.2 (i686-pc-linux-gnu, GTK+ Version 2.18.3)
of 2010-06-28 on etlken
Windowing system distributor `The X.Org Foundation', version 11.0.10604000
configured using `configure 'CFLAGS=-g''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: ja_JP.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
display-time-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
Recent input:
<help-echo> M-x r e v <backspace> p o o <tab> <backspace>
o <tab> <backspace> r <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
/usr/local/share/emacs/site-lisp/lookup-utils hides /usr/local/share/emacs/site-lisp/lookup/lookup-utils
/usr/local/share/emacs/site-lisp/lookup-vars hides /usr/local/share/emacs/site-lisp/lookup/lookup-vars
/usr/local/share/emacs/site-lisp/ndkks hides /usr/local/share/emacs/site-lisp/lookup/ndkks
/usr/local/share/emacs/site-lisp/stem-english hides /usr/local/share/emacs/site-lisp/lookup/stem-english
/usr/local/share/emacs/site-lisp/sdicf hides /usr/local/share/emacs/site-lisp/lookup/sdicf
/usr/local/share/emacs/site-lisp/ndict hides /usr/local/share/emacs/site-lisp/lookup/ndict
/usr/local/share/emacs/site-lisp/lookup-content hides /usr/local/share/emacs/site-lisp/lookup/lookup-content
/usr/local/share/emacs/site-lisp/lookup hides /usr/local/share/emacs/site-lisp/lookup/lookup
/usr/local/share/emacs/site-lisp/ndspell hides /usr/local/share/emacs/site-lisp/lookup/ndspell
/usr/local/share/emacs/site-lisp/ndeb hides /usr/local/share/emacs/site-lisp/lookup/ndeb
/usr/local/share/emacs/site-lisp/lookup-types hides /usr/local/share/emacs/site-lisp/lookup/lookup-types
/usr/local/share/emacs/site-lisp/ndsrd hides /usr/local/share/emacs/site-lisp/lookup/ndsrd
/usr/local/share/emacs/site-lisp/ndcookie hides /usr/local/share/emacs/site-lisp/lookup/ndcookie
/usr/local/share/emacs/site-lisp/lookup-select hides /usr/local/share/emacs/site-lisp/lookup/lookup-select
/usr/local/share/emacs/site-lisp/ndic hides /usr/local/share/emacs/site-lisp/lookup/ndic
/usr/local/share/emacs/site-lisp/ndtp hides /usr/local/share/emacs/site-lisp/lookup/ndtp
/usr/local/share/emacs/site-lisp/egg/leim-list hides /usr/local/work/emacs/build/leim/leim-list
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-parse hides /usr/local/work/emacs/build/lisp/pgg-parse
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sha1 hides /usr/local/work/emacs/build/lisp/sha1
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-gpg hides /usr/local/work/emacs/build/lisp/pgg-gpg
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hex-util hides /usr/local/work/emacs/build/lisp/hex-util
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg hides /usr/local/work/emacs/build/lisp/pgg
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-pgp hides /usr/local/work/emacs/build/lisp/pgg-pgp
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-def hides /usr/local/work/emacs/build/lisp/pgg-def
/usr/local/share/emacs/site-lisp/rmail-mime/mime/pgg-pgp5 hides /usr/local/work/emacs/build/lisp/pgg-pgp5
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hmac-def hides /usr/local/work/emacs/build/lisp/net/hmac-def
/usr/local/share/emacs/site-lisp/rmail-mime/mail/hmac-md5 hides /usr/local/work/emacs/build/lisp/net/hmac-md5
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl-digest hides /usr/local/work/emacs/build/lisp/net/sasl-digest
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl-cram hides /usr/local/work/emacs/build/lisp/net/sasl-cram
/usr/local/share/emacs/site-lisp/rmail-mime/mail/sasl hides /usr/local/work/emacs/build/lisp/net/sasl
/usr/local/share/emacs/site-lisp/rmail-mime/mail/smtpmail hides /usr/local/work/emacs/build/lisp/mail/smtpmail
/usr/local/share/emacs/site-lisp/rmail-mime/mail/feedmail hides /usr/local/work/emacs/build/lisp/mail/feedmail
/usr/local/share/emacs/site-lisp/egg/its/thai hides /usr/local/work/emacs/build/lisp/language/thai
/usr/local/share/emacs/site-lisp/egg/its/greek hides /usr/local/work/emacs/build/lisp/language/greek
/usr/local/share/emacs/site-lisp/rmail-mime/mime/smime hides /usr/local/work/emacs/build/lisp/gnus/smime
/usr/local/work/emacs/build/lisp/language/thai-word hides ~/emacslisp/thai-word
/usr/local/work/emacs/build/lisp/textmodes/tex-mode hides ~/emacslisp/tex-mode
/usr/local/work/emacs/build/lisp/textmodes/table hides ~/emacslisp/table
/usr/local/work/emacs/build/lisp/emacs-lisp/syntax hides ~/emacslisp/syntax
/usr/local/work/emacs/build/lisp/progmodes/prolog hides ~/emacslisp/prolog
Features:
(shadow sort gnus-util mail-extr message rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader emacsbug package time
sendmail regexp-opt rmail-sa rmailsum rmail mail-utils
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr japan-util
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd tool-bar dnd fontset image fringe lisp-mode register
page menu-bar rfn-eshadow timer select scroll-bar mldrag
mouse jit-lock font-lock syntax facemenu font-core frame
cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table
epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5
base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process
dbusbind dynamic-setting system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)
Reply sent
to
Jan Djärv <jan.h.d <at> swipnet.se>
:
You have taken responsibility.
(Mon, 28 Jun 2010 13:00:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kenichi Handa <handa <at> m17n.org>
:
bug acknowledged by developer.
(Mon, 28 Jun 2010 13:00:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
Kenichi Handa skrev 2010-06-28 10.15:
> Font X resource settings are ignored. For instnace, I have
> these settinggs:
>
> Emacs.Font: fontset-24
> Emacs.Fontset-0: -etl-*-medium-r-normal-*-14-*-*-*-*-*-fontset-14
> Emacs.Fontset-1: -etl-*-medium-r-normal-*-18-*-*-*-*-*-fontset-18
> Emacs.Fontset-2: -etl-*-medium-r-normal-*-20-*-*-*-*-*-fontset-20
> Emacs.Fontset-3: -etl-*-medium-r-normal-*-24-*-*-*-*-*-fontset-24
>
> Before the above change, Emacs uses the font
> -etl-fixed-medium-r-normal--24-...-iso8859-1, but now it
> uses the font "DejaVu Sans Mono".
Reverted to the old behaviour. This has the drawback that X resources
override use-system-font setting. Oh well.
Jan D.
Message #11 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
In article <4C289CAB.8030903 <at> swipnet.se>, Jan Djärv <jan.h.d <at> swipnet.se> writes:
> Kenichi Handa skrev 2010-06-28 10.15:
> > Font X resource settings are ignored. For instnace, I have
> > these settinggs:
> >
> > Emacs.Font: fontset-24
> > Emacs.Fontset-0: -etl-*-medium-r-normal-*-14-*-*-*-*-*-fontset-14
> > Emacs.Fontset-1: -etl-*-medium-r-normal-*-18-*-*-*-*-*-fontset-18
> > Emacs.Fontset-2: -etl-*-medium-r-normal-*-20-*-*-*-*-*-fontset-20
> > Emacs.Fontset-3: -etl-*-medium-r-normal-*-24-*-*-*-*-*-fontset-24
> >
> > Before the above change, Emacs uses the font
> > -etl-fixed-medium-r-normal--24-...-iso8859-1, but now it
> > uses the font "DejaVu Sans Mono".
> Reverted to the old behaviour.
Thank you. I confirmed that the original behavior is recovered.
> This has the drawback that X resources override
> use-system-font setting. Oh well.
What is "use-system-font setting"? Does it work if I don't
have Font X resource?
---
Kenichi Handa
handa <at> m17n.org
Message #12 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
Kenichi Handa skrev 2010-06-29 10.15:
>
>> This has the drawback that X resources override
>> use-system-font setting. Oh well.
>
> What is "use-system-font setting"?
Emacs uses the font set in the desktop preferences in Gnome, i.e. from GConf.
> Does it work if I don't have Font X resource?
Yes.
Jan D.
Message #13 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
In article <4C29BAB4.4070304 <at> swipnet.se>, Jan Djärv <jan.h.d <at> swipnet.se> writes:
> > What is "use-system-font setting"?
> Emacs uses the font set in the desktop preferences in Gnome, i.e. from GConf.
> > Does it work if I don't have Font X resource?
> Yes.
On Ubuntu, I removed all X resouses, ran the program
gnome-appearance-properties, opened "Fonts" tab, set
"Application font" to "Freemono Medium 10", then ran Emacs.
But the font used was "Dejavu Sans Mono", not "Freemono".
Is gnome-appearance-properties not that right program to set
"the desktop preferences"?
---
Kenichi Handa
handa <at> m17n.org
Message #14 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
Kenichi Handa skrev 2010-06-30 07.41:
> In article<4C29BAB4.4070304 <at> swipnet.se>, Jan Djärv<jan.h.d <at> swipnet.se> writes:
>
>>> What is "use-system-font setting"?
>
>> Emacs uses the font set in the desktop preferences in Gnome, i.e. from GConf.
>
>>> Does it work if I don't have Font X resource?
>
>> Yes.
>
> On Ubuntu, I removed all X resouses, ran the program
> gnome-appearance-properties, opened "Fonts" tab, set
> "Application font" to "Freemono Medium 10", then ran Emacs.
> But the font used was "Dejavu Sans Mono", not "Freemono".
Application font is not what we use, it is Monospaced font. Other things to
check for:
Did you compile --with-gconf (the default if GConf libraries are found) and
customize font-use-system-font to t?
You can check for feature system-font-setting in Emacs, it is set if GConf is
compiled in. The function font-get-system-font should return the system
monospaced font. You can get application font by calling
font-get-system-normal-font.
>
> Is gnome-appearance-properties not that right program to set
> "the desktop preferences"?
It is the right program.
Jan D,
Message #15 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
In article <4C2AE8D6.1070800 <at> swipnet.se>, Jan Djärv <jan.h.d <at> swipnet.se> writes:
> Application font is not what we use, it is Monospaced font. Other things to
> check for:
Ah! Perhaps you actually mean "Fixed width font". When I
change it from "monospace" to "freemono", Emacs surely uses
"freemono" font.
> Did you compile --with-gconf (the default if GConf libraries are found)
Yes. src/config.h contains this line:
/* Define to 1 if using GConf. */
#define HAVE_GCONF 1
> and customize font-use-system-font to t?
No. The docstring says "*Non-nil means to use the system
defined font.", but doesn't say what "nil" means. Anyway,
if there's no Font X resource, it seems that Emacs uses the
system defined font even if font-use-system-font is nil.
Previously, if there's no Font X resource, Emacs tried to
use one of these predefined fonts (extracted from
x_default_font_parameter):
char *names[]
= {
#ifdef HAVE_XFT
/* This will find the normal Xft font. */
"monospace-10",
#endif
"-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1",
"-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-1",
"-*-*-medium-r-normal-*-*-140-*-*-c-*-iso8859-1",
/* This was formerly the first thing tried, but it finds
too many fonts and takes too long. */
"-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1",
/* If those didn't work, look for something which will
at least work. */
"-*-fixed-*-*-*-*-*-140-*-*-c-*-iso8859-1",
"fixed",
NULL };
So, the current behaviour is still different from the
previous one. Though I'm not claiming that the current
behaviour is worse.
> You can check for feature system-font-setting in Emacs, it is set if GConf is
> compiled in.
(featurep 'system-font-setting) => t
> The function font-get-system-font should return the system
> monospaced font. You can get application font by calling
> font-get-system-normal-font.
Both return nil.
When I customize font-use-system-font to t, they return
correct font names. It's a little bit strange behavior. I
think they should return font names even if
font-use-system-font is non-nil.
---
Kenichi Handa
handa <at> m17n.org
Message #16 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
Kenichi Handa skrev 2010-06-30 09.41:
> In article<4C2AE8D6.1070800 <at> swipnet.se>, Jan Djärv<jan.h.d <at> swipnet.se> writes:
>
>> Application font is not what we use, it is Monospaced font. Other things to
>> check for:
>
> Ah! Perhaps you actually mean "Fixed width font". When I
> change it from "monospace" to "freemono", Emacs surely uses
> "freemono" font.
Yes, I meant Fixed width. I didn't have the actual screen in front of me.
>> and customize font-use-system-font to t?
>
> No. The docstring says "*Non-nil means to use the system
> defined font.", but doesn't say what "nil" means. Anyway,
> if there's no Font X resource, it seems that Emacs uses the
> system defined font even if font-use-system-font is nil.
I'll improve the documentation.
>
> Previously, if there's no Font X resource, Emacs tried to
> use one of these predefined fonts (extracted from
> x_default_font_parameter):
>
> char *names[]
> = {
> #ifdef HAVE_XFT
> /* This will find the normal Xft font. */
> "monospace-10",
> #endif
> "-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1",
> "-misc-fixed-medium-r-normal-*-*-140-*-*-c-*-iso8859-1",
> "-*-*-medium-r-normal-*-*-140-*-*-c-*-iso8859-1",
> /* This was formerly the first thing tried, but it finds
> too many fonts and takes too long. */
> "-*-*-medium-r-*-*-*-*-*-*-c-*-iso8859-1",
> /* If those didn't work, look for something which will
> at least work. */
> "-*-fixed-*-*-*-*-*-140-*-*-c-*-iso8859-1",
> "fixed",
> NULL };
>
> So, the current behaviour is still different from the
> previous one. Though I'm not claiming that the current
> behaviour is worse.
>
It is the same old startup problem. For the first frame we don't know if
font-use-system-font is set as .emacs has not been read when the code above is
run. So we suggest the system font anyway, it is as good a suggestion as any
other font. Better in fact, we can be sure that font exists and is probably
familiar to the user if gedit or gnome-terminal has been used.
>> You can check for feature system-font-setting in Emacs, it is set if GConf is
>> compiled in.
>
> (featurep 'system-font-setting) => t
>
>> The function font-get-system-font should return the system
>> monospaced font. You can get application font by calling
>> font-get-system-normal-font.
>
> Both return nil.
>
> When I customize font-use-system-font to t, they return
> correct font names. It's a little bit strange behavior. I
> think they should return font names even if
> font-use-system-font is non-nil.
>
It was needed at some point, but I think that is not the case anymore. I'll
check. font-use-system-font controls if Emacs changes its fonts on the fly
when the system font is changed.
Jan D.
Message #17 received at 6526-done <at> debbugs.gnu.org (full text, mbox):
In article <4C2B0EB6.9090409 <at> swipnet.se>, Jan Djärv <jan.h.d <at> swipnet.se> writes:
> I'll improve the documentation.
Thank you. The new ones are much better.
> It is the same old startup problem. For the first frame we don't know if
> font-use-system-font is set as .emacs has not been read when the code above is
> run. So we suggest the system font anyway, it is as good a suggestion as any
> other font. Better in fact, we can be sure that font exists and is probably
> familiar to the user if gedit or gnome-terminal has been used.
I see.
> It was needed at some point, but I think that is not the case anymore. I'll
> check. font-use-system-font controls if Emacs changes its fonts on the fly
> when the system font is changed.
I confirmed that now font-get-*-font works even if
font-use-system-font is nil, thank you.
---
Kenichi Handa
handa <at> m17n.org
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 29 Jul 2010 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 25 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.