unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 19395@debbugs.gnu.org, malsburg@posteo.de
Subject: bug#19395: 25.0.50; Setting left fringe to 0 messes up window-width
Date: Sat, 20 Dec 2014 14:45:43 +0200	[thread overview]
Message-ID: <838ui2sd54.fsf@gnu.org> (raw)
In-Reply-To: <549560B9.5070308@gmx.at>

> Date: Sat, 20 Dec 2014 12:42:49 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: malsburg@posteo.de, 19395@debbugs.gnu.org
> 
>  > AFAIU, it only says so about the set-face-FOO functions, which doesn't
>  > include face-font.
> 
> Here I see in "37.12.3 Face Attribute Functions"
> 
> ...
> 
>     The following functions examine the attributes of a face.  They
> mostly provide compatibility with old versions of Emacs.  If you don't
> specify FRAME, they refer to the selected frame; `t' refers to the
> default data for new frames.  They return `unspecified' if the face
> doesn't define any value for that attribute.  If INHERIT is `nil', only
> an attribute directly defined by the face is returned.  If INHERIT is
> non-`nil', any faces specified by its `:inherit' attribute are
> considered as well, and if INHERIT is a face or a list of faces, then
> they are also considered, until a specified attribute is found.  To
> ensure that the return value is always specified, use a value of
> `default' for INHERIT.
> 
>   -- Function: face-font face &optional frame
>       This function returns the name of the font of face FACE.

Ah, OK.  That probably wants you to use the Brave New World's

   (face-attribute 'default :font)

instead of using face-font.

>  > How can the current buffer be not displayed in the selected frame?
> 
> As in
> 
> (with-selected-frame some-frame
>    (with-current-buffer a-buffer-not-displayed-on-some-frame
>      ...

Which makes it "displayed", as far as Emacs is concerned, right?

IOW, for this purpose, the fact that the display engine didn't
actually display the buffer doesn't matter.  All we need is the frame
and access to face-remapping-alist.

>  >> I still don't
>  >> understand where and how text rescaling is applied.
>  >
>  > In face-remap.el, and then in xfaces.c (search for face_remapping in
>  > the latter).
> 
> This boils down to understanding the 200+ lines of merge_face_ref, at
> least.

What do you want to understand?  In a nutshell, we go through the
face-remapping-alist, and if the face is there, use the remapped
face's attributes instead.

> If I look at the doc-string of say `text-scale-adjust' I cannot see that
> some buffer local value is mentioned although C-x C-- clearly has only a
> buffer local effect here.  So I obviously have to delve into the doc of
> something like `face-remapping-alist' which, however, doesn't mention
> any relationship of faces to frames.

face-remapping-alist is applied _after_ the frame-specific face is
retrieved.  Does that answer your problem?

> IIUC face remapping maps a default face (which may be frame specific or
> not) via a scaling value (which may be buffer local or not) to another
> face whose width I eventually want to retrieve via `face-font'.  Does
> the buffer/frame/window relationship affect that value and if so how?

AFAIK, only the buffer matters, since face-remapping-alist is
buffer-local.





  reply	other threads:[~2014-12-20 12:45 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16 20:01 bug#19395: 25.0.50; Setting left fringe to 0 messes up window-width Titus von der Malsburg
2014-12-16 20:09 ` Eli Zaretskii
2014-12-16 20:36   ` Titus von der Malsburg
2014-12-16 20:58     ` Eli Zaretskii
2014-12-16 23:12       ` Stefan Monnier
2014-12-17  3:39         ` Eli Zaretskii
2014-12-17 14:16           ` Stefan Monnier
2014-12-17 15:47             ` Eli Zaretskii
2014-12-17 21:31               ` Stefan Monnier
2014-12-17 22:57                 ` Drew Adams
2014-12-18  3:37                 ` Eli Zaretskii
2014-12-18 14:24                   ` Stefan Monnier
2014-12-18 15:51                     ` Eli Zaretskii
2014-12-20 10:09                       ` martin rudalics
2014-12-20 11:00                         ` Eli Zaretskii
2014-12-17  3:46         ` Titus von der Malsburg
2014-12-17 15:29           ` Eli Zaretskii
2014-12-17 21:34             ` Stefan Monnier
2014-12-18  3:40               ` Eli Zaretskii
2014-12-18 14:25                 ` Stefan Monnier
2014-12-18 15:52                   ` Eli Zaretskii
2014-12-17  3:28       ` Titus von der Malsburg
2014-12-17 15:32         ` Eli Zaretskii
2014-12-17 17:18           ` Titus von der Malsburg
2014-12-17 18:21             ` Eli Zaretskii
2014-12-17 18:48               ` Titus von der Malsburg
2014-12-17 19:09                 ` Eli Zaretskii
2014-12-18  3:36                   ` Titus von der Malsburg
2014-12-18 16:15                     ` Eli Zaretskii
2014-12-19 17:09                       ` martin rudalics
2014-12-19 19:35                         ` Eli Zaretskii
2014-12-20 10:09                           ` martin rudalics
2014-12-20 10:59                             ` Eli Zaretskii
2014-12-20 11:42                               ` martin rudalics
2014-12-20 12:45                                 ` Eli Zaretskii [this message]
2014-12-20 14:51                                   ` martin rudalics
2014-12-20 16:36                                     ` Eli Zaretskii
2014-12-20 17:50                                       ` martin rudalics
2014-12-20 18:16                                         ` Eli Zaretskii
2014-12-20 18:58                                           ` martin rudalics
2014-12-20 19:52                                             ` Eli Zaretskii
2014-12-21 12:14                                               ` Titus von der Malsburg
2014-12-21 16:43                                                 ` Eli Zaretskii
2014-12-20 14:51                       ` Titus von der Malsburg
2014-12-20 15:06                         ` martin rudalics
2014-12-20 15:21                           ` Titus von der Malsburg
2014-12-20 16:03                             ` martin rudalics
2014-12-20 16:40                               ` Eli Zaretskii
2014-12-20 15:45                           ` Titus von der Malsburg
2014-12-20 16:38                           ` Eli Zaretskii
2014-12-20 17:51                             ` martin rudalics
2014-12-20 18:19                               ` Eli Zaretskii
2014-12-20 16:31                         ` Eli Zaretskii
2014-12-21 22:04                           ` Titus von der Malsburg
2014-12-22 16:00                             ` Eli Zaretskii
2022-04-29 13:14                               ` Lars Ingebrigtsen
2022-06-02 21:41                                 ` Jim Porter
     [not found]                                 ` <a54d35b0-7ed6-374c-2a14-e7d97cf6c0a2@gmail.com>
2022-06-03  3:21                                   ` Lars Ingebrigtsen
2014-12-18 17:16         ` Eli Zaretskii

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=838ui2sd54.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=19395@debbugs.gnu.org \
    --cc=malsburg@posteo.de \
    --cc=rudalics@gmx.at \
    /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).