GNU bug report logs - #14648
24.3.50; `font' frame parameter bizarreness

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Tue, 18 Jun 2013 05:50:02 UTC

Severity: minor

Found in version 24.3.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 14648 in the body.
You can then email your comments to 14648 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14648; Package emacs. (Tue, 18 Jun 2013 05:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 18 Jun 2013 05:50:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; `font' frame parameter bizarreness
Date: Mon, 17 Jun 2013 22:49:09 -0700 (PDT)
emacs -Q

(modify-frame-parameters
  (selected-frame)
  '((font . "-outline-Gabriola-normal-normal-normal-decorative")))

Note that the font string here is not a valid XFLD, but it has the first
6 fields of a valid XFLD.  If it were suffixed by "-*-*-*-*-*-*-*-*"
then the value would be a valid XFLD (and the bug described below would
not be realized - things work correctly).

The font of the frame is indeed changed, but not to the font specified,
and not to the default font either (e.g., the font for face `default').

(frame-parameter nil 'font) =>
"-outline-Arial-normal-normal-normal-sans-20-*-*-*-p-*-iso8859-1"

What's that?  The doc says nothing about this bizarre behavior.
Where did this font come from?

The doc ((elisp) `Font and Color Parameters') says that the `font'
parameter value:

 "is a string, either a valid font name for your system or the name of
  an Emacs fontset (*note Fontsets::).  It is equivalent to the `font'
  attribute of the `default' face."

IOW, it must be valid.  The doc does not specify what happens if it is
not valid, but it should.

And if you provide an invalid string such as just "foobar" as the `font'
parameter value (e.g., in the `modify-frame-parameters' above) then you
do get an Emacs error stating that the font name is not valid.  That
presumably is the right behavior for any invalid font name, including
the "...Gabriola..." one used above.

Why do you not get such an error with that invalid font name?
Shouldn't you?  And why do you get the particular (undocumented) font
that you do get.

Why should Emacs modify the frame to give you something other than what
you asked for?  And if it should, then this odd "defaulting" behavior
should be documented.


In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-06-17 on ODIEONE
Bzr revision: 113024 eliz <at> gnu.org-20130617163040-8hmzci370q4argze
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 CFLAGS=-O0 -g3 LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14648; Package emacs. (Tue, 18 Jun 2013 15:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 14648 <at> debbugs.gnu.org (full text, mbox):

From: Kenichi Handa <handa <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 14648 <at> debbugs.gnu.org
Subject: Re: bug#14648: 24.3.50; `font' frame parameter bizarreness
Date: Tue, 18 Jun 2013 11:17:04 -0400
In article <5254f82d-9d1e-448c-83b1-17f87b64aa7b <at> default>, Drew Adams
<drew.adams <at> oracle.com> writes:

> emacs -Q
> (modify-frame-parameters
>   (selected-frame)
>   '((font . "-outline-Gabriola-normal-normal-normal-decorative")))

> Note that the font string here is not a valid XFLD, but it has the
> first
> 6 fields of a valid XFLD.  If it were suffixed by "-*-*-*-*-*-*-*-*"
> then the value would be a valid XFLD (and the bug described below
> would
> not be realized - things work correctly).

> The font of the frame is indeed changed, but not to the font
> specified,
> and not to the default font either (e.g., the font for face
> `default').

Thank you for the report.  I've just installed a fix to signal an error
for an invalid font name in such a case.

> (frame-parameter nil 'font) =>
> "-outline-Arial-normal-normal-normal-sans-20-*-*-*-p-*-iso8859-1"

> What's that?  The doc says nothing about this bizarre behavior.
> Where did this font come from?

It may be the default font found on your system when none of
font property is specified.

---
Kenichi Handa
handa <at> gnu.org




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14648; Package emacs. (Sat, 08 Feb 2014 07:03:02 GMT) Full text and rfc822 format available.

Message #11 received at 14648 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kenichi Handa <handa <at> gnu.org>
Cc: 14648 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#14648: 24.3.50; `font' frame parameter bizarreness
Date: Fri, 07 Feb 2014 23:00:51 -0800
Kenichi Handa <handa <at> gnu.org> writes:

>> The font of the frame is indeed changed, but not to the font
>> specified,
>> and not to the default font either (e.g., the font for face
>> `default').
>
> Thank you for the report.  I've just installed a fix to signal an error
> for an invalid font name in such a case.
>
>> (frame-parameter nil 'font) =>
>> "-outline-Arial-normal-normal-normal-sans-20-*-*-*-p-*-iso8859-1"
>
>> What's that?  The doc says nothing about this bizarre behavior.
>> Where did this font come from?
>
> It may be the default font found on your system when none of
> font property is specified.

Looks like this is fixed, then?  I'm closing the report; please reopen
if this is still a problem.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug closed, send any further explanations to 14648 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 08 Feb 2014 07:03:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 08 Mar 2014 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 107 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.