emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is a default font?


From: martin rudalics
Subject: Re: What is a default font?
Date: Sat, 7 Dec 2019 10:39:51 +0100

>>> OK.  Couldn't you then fix the doc-string of 'face-font' accordingly?
>>
>> Will do.
>
> Done.

Thanks.  But you left the doc-string of 'face-font' alone.  That
doc-string still says that

  If FRAME is t, report on the defaults for face FACE (for new frames).

which is wrong according to Stefan

  Yes, you can, but only if you know in which frame it will be displayed
  (or you can approximate it by using a frame "similar" to the one that
  will be used).

and you

  For a frame that was not yet created there are too many unknowns
  for face-font to be able to help you efficiently.  The best you can do
  is assume the new frame will have the same faces as the selected one.

So pretty please remove that line from the doc-string of 'face-font'
provided you still agree with what both of you said above.

What I'm still unsure about is the following paragraph in the Elisp
manual:

     If ‘face-remapping-alist’ is buffer-local, its local value takes
     effect only within that buffer.  If ‘face-remapping-alist’ includes
     faces applicable only to certain windows, by using the
     ‘(:filtered (:window PARAM VAL) SPEC)’, that face takes effect only
     in windows that match the filter conditions (*note Special
     Properties::).  To turn off face filtering temporarily, bind
     ‘face-filters-always-match’ to a non-‘nil’ value, then all face
     filters will match any window.

From this I'd conclude that I might have to explicitly select a
specific window (and not just its frame) before calling any of the
functions 'default-font-height', 'face-font', ... in order to process
'face-remapping-alist' correctly.  Is that conclusion correct?  If so,
the descriptions of these functions should tell that.

Thanks, martin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]