[Top][All Lists]

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

Re: Question about display engine

From: martin rudalics
Subject: Re: Question about display engine
Date: Sun, 11 Aug 2019 10:17:13 +0200

>> Per-face indeed sounds like a better option than per-attribute.
>> Furthermore, it should be much easier to add it in a clean way to the
>> current system.
>> Of course per-face per-attribute would be even more flexible, but I'm
>> not completely convinced it's worth the trouble.
> I later came to the conclusion that even per-face is not really
> workable, due to face merging.  WDYT?

I think both would be feasible.  Just that with a face attribute the
face merger would have to specify whether a certain property should
extend to the end of line while with an attribute property the (face
agnostic) display engine could handle face extension alone.

Suppose we want to display a newline character that is both
highlighted and part of the region and assume that highlighting is
realized via :underline and the region via :background.

With the face attribute based approach, the face merger would set a
'background-extend' flag according to the :extend attribute of the
region face and an 'underline-extend' flag according to the :extend
attribute of the highlight face.  The face agnostic display engine
would use these flags to decide whether the corresponding properties
should extend to the edge of the window or not

With the attribute based approach, the display engine would extend the
background directly from the newline character corresponding to
whether the background attribute's extend property was set (for
example, because 'background' is explicitly listed in an
'attribute-extend' variable) and do the same for the newline's
underline property (if we wanted to allow that).

The face-based approach will "misfire" when a user decides to show the
region via underline and sets the region's extend property.  I'd
consider that a pilot error.  The attribute-based approach will
misfire when the user makes the underline attribute have the extend
property (if we allowed to do that).  Or am I missing something?


reply via email to

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