From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#14648: 24.3.50; `font' frame parameter bizarreness Date: Mon, 17 Jun 2013 22:49:09 -0700 (PDT) Message-ID: <5254f82d-9d1e-448c-83b1-17f87b64aa7b@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1371534609 29807 80.91.229.3 (18 Jun 2013 05:50:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2013 05:50:09 +0000 (UTC) To: 14648@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 18 07:50:09 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uoonw-00037y-I8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2013 07:50:08 +0200 Original-Received: from localhost ([::1]:42067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uoonw-0005vD-8I for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2013 01:50:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uoonr-0005tD-Vq for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 01:50:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uoonq-0006hO-R0 for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 01:50:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uoonq-0006g2-Nm for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 01:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Uoonq-0001wP-7I for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 01:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2013 05:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14648 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13715345657392 (code B ref -1); Tue, 18 Jun 2013 05:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Jun 2013 05:49:25 +0000 Original-Received: from localhost ([127.0.0.1]:52081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UoonE-0001v9-ND for submit@debbugs.gnu.org; Tue, 18 Jun 2013 01:49:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57887) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UoonC-0001us-Ps for submit@debbugs.gnu.org; Tue, 18 Jun 2013 01:49:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uoon6-0006YB-9F for submit@debbugs.gnu.org; Tue, 18 Jun 2013 01:49:17 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:41384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uoon6-0006Y6-6j for submit@debbugs.gnu.org; Tue, 18 Jun 2013 01:49:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uoon5-0005pW-4J for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 01:49:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uoon2-0006Wi-Mt for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 01:49:15 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:30084) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uoon2-0006WZ-HF for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 01:49:12 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r5I5nBKw012043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Jun 2013 05:49:11 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5I5nASh010099 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Jun 2013 05:49:11 GMT Original-Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5I5nAoh010093 for ; Tue, 18 Jun 2013 05:49:10 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75279 Archived-At: 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) =3D> "-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=3D/c/Devel/emacs/binary --enable-checking=3Dyes,glyphs CFLAGS=3D-O0 -g3 LDFLAGS=3D-Lc:/Devel/emacs/lib CPPFLAGS=3D-Ic:/Devel/emacs/include'