all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#14648: 24.3.50; `font' frame parameter bizarreness
@ 2013-06-18  5:49 Drew Adams
  2013-06-18 15:17 ` Kenichi Handa
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2013-06-18  5:49 UTC (permalink / raw
  To: 14648

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@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'





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#14648: 24.3.50; `font' frame parameter bizarreness
  2013-06-18  5:49 bug#14648: 24.3.50; `font' frame parameter bizarreness Drew Adams
@ 2013-06-18 15:17 ` Kenichi Handa
  2014-02-08  7:00   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Kenichi Handa @ 2013-06-18 15:17 UTC (permalink / raw
  To: Drew Adams; +Cc: 14648


In article <5254f82d-9d1e-448c-83b1-17f87b64aa7b@default>, Drew Adams
<drew.adams@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@gnu.org





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#14648: 24.3.50; `font' frame parameter bizarreness
  2013-06-18 15:17 ` Kenichi Handa
@ 2014-02-08  7:00   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-08  7:00 UTC (permalink / raw
  To: Kenichi Handa; +Cc: 14648

Kenichi Handa <handa@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/





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-08  7:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-18  5:49 bug#14648: 24.3.50; `font' frame parameter bizarreness Drew Adams
2013-06-18 15:17 ` Kenichi Handa
2014-02-08  7:00   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.