GNU bug report logs - #64166
29.0.92; A :box with negative vertical width does not avoid any increase in the line height

Previous Next

Package: emacs;

Reported by: Sebastian Miele <iota <at> whxvd.name>

Date: Mon, 19 Jun 2023 13:02:01 UTC

Severity: normal

Tags: notabug

Found in version 29.0.92

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sebastian Miele <iota <at> whxvd.name>
Cc: 64166 <at> debbugs.gnu.org
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 <at> 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?




This bug report was last modified 1 year and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.