unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@gnu.org>
To: 14629@debbugs.gnu.org
Subject: bug#14629: 24.3.50; (elisp) `Face Attributes', :font -> "font object"
Date: Mon, 17 Jun 2013 11:14:12 -0400	[thread overview]
Message-ID: <yw7bo744vnf.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <ae0d1ded-94c5-48eb-ac1a-ed991cbb17e8@default>


> From: Drew Adams <drew.adams@oracle.com>
[...]
> 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






  reply	other threads:[~2013-06-17 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-16  6:01 bug#14629: 24.3.50; (elisp) `Face Attributes', :font -> "font object" Drew Adams
2013-06-17 15:14 ` Kenichi Handa [this message]
2013-06-17 16:37   ` Drew Adams
2013-06-17 20:06     ` Drew Adams
2019-11-02 15:01     ` Eli Zaretskii
2020-09-21 14:30       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw7bo744vnf.fsf@fencepost.gnu.org \
    --to=handa@gnu.org \
    --cc=14629@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).