emacs-devel
[Top][All Lists]
Advanced

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

Re: Question about display engine


From: Ergus
Subject: Re: Question about display engine
Date: Wed, 28 Aug 2019 00:20:25 +0200
User-agent: NeoMutt/20180716

On Mon, Aug 26, 2019 at 12:49:27PM +0300, Eli Zaretskii wrote:
Date: Mon, 26 Aug 2019 10:18:19 +0200
From: Ergus <address@hidden>
Cc: address@hidden, address@hidden

>> Could you please finally explain what are all the points needed in the
>> implementation? And more or less the changes needed/expected?
>
>Regarding face extension, or regarding highlight-indentation?  These
>were 2 separate discussions, but you somehow conflated them together
>in your last email.

Regarding face extension

The summary was posted by Martin here:

 https://lists.gnu.org/archive/html/emacs-devel/2019-08/msg00324.html

If something there is unclear, please ask specific questions.

Thanks.


Hi Eli:

Starting with this I just need a couple of details to clarify if I
understand everything:

(1) Provide an :extend face attribute with the semantics to extend, if
   set, any "background-related" attributes like :background,
   :underline, :box ... specified by this face.

The extend attribute here must be just a boolean to extend everything
set in this class or something to specify what to extend from within
this face?

(2) When merging faces, set an extend-background, extend-underline,
   extend-box ... bit for all background-related attributes whenever
   the face merged in has both the :extend attribute non-nil and the
   corresponding background-related attribute set.

(3) When the display engine encounters a newline character and the
   current face has one of the extend-* bits set, either reuse or
   create a new realized face based on the current face, removing
   from a new realized face any background-related information for
   which the current face that has the corresponding extend-* bit
   set.  For example, if the current face specifies a background,
   remove that in the new face if the extend-background bit is unset.

(4) Use the face found or made in (3) for glyphs on the rest of the
   current line.


1- Are the bits stored in the class or they are supposed to be like a
display engine state variable?

Check this true table please:

merge_faces (struct window *w, Lisp_Object face_name, int face_id,
            int base_face_id)

struct face = {extend_flag; bg, extend_bg_flag}

base_face -> face = merged

{true, nil, false} -> {false, y, false} -> {false, y, true} // ????
{false, x, false} -> {true, nil, false} -> {true, x, true}     // Is this fine?

When in 3 it says "remove", what does it means? set it to x, to default or
to nil?

In case we don't extend, the extra space we add after the line should
have the default, face or the last in the line??



reply via email to

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