[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a05950b2-8995-484f-8678-699584d30ffe@kernel.org>
Date: Wed, 16 Apr 2025 05:45:41 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Nicolas Pitre <nico@...xnic.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Nicolas Pitre <npitre@...libre.com>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 03/13] vt: properly support zero-width Unicode code
points
On 15. 04. 25, 21:17, Nicolas Pitre wrote:
> From: Nicolas Pitre <npitre@...libre.com>
>
> Zero-width Unicode code points are causing misalignment in vertically
> aligned content, disrupting the visual layout. Let's handle zero-width
> code points more intelligently.
>
> Double-width code points are stored in the screen grid followed by a white
> space code point to create the expected screen layout. When a double-width
> code point is followed by a zero-width code point in the console incoming
> bytestream (e.g., an emoji with a presentation selector) then we may
> replace the white space padding by that zero-width code point instead of
> dropping it. This maximize screen content information while preserving
> proper layout.
>
> If a zero-width code point is preceded by a single-width code point then
> the above trick is not possible and such zero-width code point must
> be dropped.
>
> VS16 (Variation Selector 16, U+FE0F) is special as it doubles the width
> of the preceding single-width code point. We handle that case by giving
> VS16 a width of 1 when that happens.
>
> Signed-off-by: Nicolas Pitre <npitre@...libre.com>
Reviewed-by: Jiri Slaby <jirislaby@...nel.org>
--
js
suse labs
Powered by blists - more mailing lists