From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: bug#14629: 24.3.50; (elisp) `Face Attributes', :font -> "font object" Date: Mon, 17 Jun 2013 11:14:12 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1371482655 23420 80.91.229.3 (17 Jun 2013 15:24:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 17 Jun 2013 15:24:15 +0000 (UTC) To: 14629@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 17 17:24:15 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 1UobHu-0007sD-KH for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Jun 2013 17:24:10 +0200 Original-Received: from localhost ([::1]:57440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UobHu-0008DV-7q for geb-bug-gnu-emacs@m.gmane.org; Mon, 17 Jun 2013 11:24:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UobHq-0008DA-RG for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2013 11:24:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UobHo-0005qM-2j for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2013 11:24:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uob95-0001v0-PK for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2013 11:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Uob95-0003qP-9h for bug-gnu-emacs@gnu.org; Mon, 17 Jun 2013 11:15:03 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Kenichi Handa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 17 Jun 2013 15:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14629 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14629-submit@debbugs.gnu.org id=B14629.137148205614617 (code B ref 14629); Mon, 17 Jun 2013 15:15:03 +0000 Original-Received: (at 14629) by debbugs.gnu.org; 17 Jun 2013 15:14:16 +0000 Original-Received: from localhost ([127.0.0.1]:50837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uob8J-0003nf-Az for submit@debbugs.gnu.org; Mon, 17 Jun 2013 11:14:15 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:43543 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uob8H-0003nU-Kv for 14629@debbugs.gnu.org; Mon, 17 Jun 2013 11:14:14 -0400 Original-Received: from handa by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Uob8G-00040W-Ph for 14629@debbugs.gnu.org; Mon, 17 Jun 2013 11:14:13 -0400 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:75251 Archived-At: > From: Drew Adams [...] > The description of face attribute :font is incomprehensible. > It says that the value should be a "font object". What is that, you > ask? Well, it says to see node `Font Selection' to find out. But > that > node says nothing about a "font object". I've just committed the attached fix. > I have no idea what it is, that is, what possible values attribute > :font > can have. I know about the frame parameter `font', whose value is an > XLFD string (AFAICT). But I have no idea what :font can be set to. You can also specify a font name, which is written in Info as below: When specifying this attribute using `set-face-attribute' (*note Attribute Functions::), you may also supply a font spec, a font entity, or a string. Emacs converts such values to an appropriate font object, and stores that font object as the actual attribute value. If you specify a string, the contents of the string should be a font name (*note Fonts: (emacs)Fonts.); if the font name is an XLFD containing wildcards, Emacs chooses the first font matching those wildcards. > Not only that, but if I try to guess from using `M-x customize-face', > there is no `Font' attribute. There are only attributes `Font Family' > and `Font Foundry'. Ah, perhaps customize-face should be improved. --- Kenichi Handa handa@gnu.org === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-04-06 07:39:48 +0000 +++ doc/lispref/display.texi 2013-06-17 15:00:04 +0000 @@ -2126,7 +2126,8 @@ @item :font The font used to display the face. Its value should be a font object. -@xref{Font Selection}, for information about font objects. +@xref{Low-Level Font}, for information about font objects, font specs, +and font entities. When specifying this attribute using @code{set-face-attribute} (@pxref{Attribute Functions}), you may also supply a font spec, a font @@ -3260,7 +3261,9 @@ properties are intermediate between a font object and a font spec: like a font object, and unlike a font spec, it refers to a single, specific font. Unlike a font object, creating a font entity does not -load the contents of that font into computer memory. +load the contents of that font into computer memory. Emacs may open +multiple font objects of different sizes from a single font entity +referring to a scalable font. @defun find-font font-spec &optional frame This function returns a font entity that best matches the font spec