[Top][All Lists]

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

Re: Fill column indicator functionality

From: Eli Zaretskii
Subject: Re: Fill column indicator functionality
Date: Fri, 05 Apr 2019 18:28:40 +0300

> Date: Fri, 05 Apr 2019 16:06:17 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> Once you can reproduce the problem, I suggest to use the macro
> FACE_FOR_CHAR to find the ID of a face suitable for displaying the
> indicator character, instead of using DEFAULT_FACE_ID.  You can find
> examples of using this macro elsewhere in xdisp.c.

On second thought, I think using FACE_FOR_CHAR would produce
unpleasant results.  If the font required to display U+2502 is not the
default font, it could be higher than the default font, which will
cause the line height become larger on those screen lines where the
indicator is displayed.  The result will cause complaints.

So I think we should insist on being able to display the indicator
character by the default face's font.  Whether this is possible could
be tested by comparing the font returned by internal-char-font and the
default face's font returned by face-font.  Like this:

  (if (eq (aref (car (internal-char-font nil ?│)) 0)
          (face-font 'default))
       ;; can use the default font for U+2502

(But we should use the actual value of
display-fill-column-indicator-char instead of the literal character.)


reply via email to

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