all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Kenichi Handa <handa@gnu.org>, 14629@debbugs.gnu.org
Subject: bug#14629: 24.3.50; (elisp) `Face Attributes', :font -> "font object"
Date: Mon, 17 Jun 2013 09:37:56 -0700 (PDT)	[thread overview]
Message-ID: <8519799d-4c07-4eb2-850e-95f90af49ca0@default> (raw)
In-Reply-To: <yw7bo744vnf.fsf@fencepost.gnu.org>

[Resending - forgot to include the bug list in my reply.]

> > 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.

Thanks for working on this so promptly.

> > 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,

You say "also".  In addition to what?  What else can one provide here,
besides a font name?

> which is written in Info as below:
> 
>      When specifying this attribute using `set-face-attribute'

But I am not using `set-face-attribute'.  What then?

This node is about face attributes generally.  I'm specifying them
this way, for instance:

(propertize MYFONT
            'face
            (list :foundry FOUNDRY :family FAMILY :weight WEIGHT
                  :slant SLANT :width WIDTH))

That uses text property `face', specifying certain face attributes,
which this node presumably describes.  And in general it works.

Text property `face' is no doubt not the same thing as a face.
But what about a face attribute?  Doesn't a face attribute apply
to both a face and the `face' text property?

And again, using the attributes with a `face' text property does work
for some of the attributes.  Is it not a bug that it does not work
for all of them?  If not, it is a doc bug that we do not specify
which face attributes you can use with a `face' text property.

>      (*note Attribute Functions::), you may also supply a font spec,

What is a font spec?  Is it something like the XLFD string above?

>      a font entity,

What is a font entity?

>      or a string.

What kind of string?  What's the format?

>      Emacs converts such values to an appropriate font object,

As I mentioned before, "font object" seems to be defined nowhere -
at least not in the node cross-referenced for it.  What is a font
object?

>      and stores that font object as the actual attribute
>      value.

Beyond the doc, there is a real product bug - see #14634.
In particular, attribute :font seems to have *no effect* when you do,
for example, this:

(propertize myfont 'face (list :font myfont))

> > 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.

Yes.

But the problem seems to be greater than Customize.  See above:
attribute :font has no effect in at least some contexts (beyond
Customize).  It's not clear what contexts it actually has the
documented effect.  Is it only for `set-face-attribute'?  That would
mean that it does not apply to contexts such as using text property
`face'.


> === modified file 'doc/lispref/display.texi'

Thanks for the patch, but sorry, but I do not see how it is relevant
to this bug.





  reply	other threads:[~2013-06-17 16:37 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
2013-06-17 16:37   ` Drew Adams [this message]
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

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

  git send-email \
    --in-reply-to=8519799d-4c07-4eb2-850e-95f90af49ca0@default \
    --to=drew.adams@oracle.com \
    --cc=14629@debbugs.gnu.org \
    --cc=handa@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 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.