emacs-devel
[Top][All Lists]
Advanced

[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:14:33 +0200

>> OTOH, the display engine could simply delegate some design decisions
>> to the face specification apparatus and attribute any faults to the
>> latter.
>
> I don't think this is workable, because of face merging.  The actual
> face used to display the last character on a screen line can (and
> frequently does) come from merging several faces, and there's no
> meaningful answer to the question: which face did this attribute come
> from?

Answering this question should not be the task of a (face agnostic)
display engine.  The face merging algorithm would have to decide
whether the :extend attribute of the winning face should cause an
extension of any attribute specified by that face.  Which means that
if the region is specified as both underlining and background, _both_
would extend if the extend attribute of the region face is set.  It's
the user's responsibility to either not set underline or not request
extension of the region if such behavior is unwanted.

> For a face merged from 2 or more faces defined via defface, how
> do you tell whether or not to extend it?  Thus, such delegation can
> only yield inconsistent behavior and more bug reports.

But there's only one face that decides whether and how the background
shall be set and there's only face that decides that for underlining.
Those faces' :extend attribute would specify how to extend the
background and how to extend the underline.

martin



reply via email to

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