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

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

bug#64166: 29.0.92; A :box with negative vertical width does not avoid a


From: Eli Zaretskii
Subject: bug#64166: 29.0.92; A :box with negative vertical width does not avoid any increase in the line height
Date: Mon, 19 Jun 2023 22:41:53 +0300

> From: Sebastian Miele <iota@whxvd.name>
> Date: Mon, 19 Jun 2023 14:46:17 +0200
> 
> In ‘src/emacs -Q’ create a buffer in fundamental mode and add the
> following contents:
> 
>   text
>   text
>   text
> 
> At the end of the second line, evaluate (‘eval-expression’):
> 
>   (insert (propertize "text" 'face '(:box '(:line-width (-1 . -1)))))
> 
> The height of the line clearly changes.  But that is contrary to what
> the manual says about the ‘:box’ face attribute:
> 
>   "A negative horizontal or vertical width −N means to draw a line of
>   width N that occupies the space of the underlying text, thus avoiding
>   any increase in the character height or width."

The above is incorrect face specification.  Try this instead:

  (insert (propertize "text" 'face '(:box (:line-width (-1 . -1)))))

> Apart from that:
> 
> (1) Using ‘:line-width (-1 . -1)’ seems to yield the exact same result
> as ‘:line-width (1 . 1)’ does, both in width and in height.
> 
> (2) Using even larger negative values has no effect.
> ‘:line-width (-10 . -10)’ also seems to yield the exact same result as
> ‘:line-width (1 . 1)’ does.
> 
> Apparantly, all negative values are treates as positive 1, contrary to
> what the manual states.

What happens if you remove the redundant quote?





reply via email to

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