bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#19395: 25.0.50; Setting left fringe to 0 messes up window-width


From: martin rudalics
Subject: bug#19395: 25.0.50; Setting left fringe to 0 messes up window-width
Date: Sat, 20 Dec 2014 12:42:49 +0100

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

...

Maybe "mostly" is special here.

>> But we also should mention (and I still think `font-info' is the better
>> place for that) what happens when the current buffer has rescaled text
>> but is not displayed on the selected frame (or the frame denoted by the
>> argument of `font-info').
>
> 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
    ...

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

> Assuming I understand correctly what is it that confused
> you.

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.

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?

martin





reply via email to

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