Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] lib/fonts: Fix bit position when rotating by 180 degrees
Date: Tue, 28 Apr 2026 14:19:54 +0200	[thread overview]
Message-ID: <ecc5e3c3-5afd-4c14-914c-8714b9278fa4@gmx.de> (raw)
In-Reply-To: <20260428083025.63663-1-tzimmermann@suse.de>

On 4/28/26 10:28, Thomas Zimmermann wrote:
> Fix the horizontal bit position when rotating a glyph by 180°. The
> original code in rotate_ud() rounded the value in width up to a
> multiple of 8, aka the bit pitch, and calculated the rotated pixel
> from that value. The new code stores the glyph's pitch in bit_pitch,
> but fails to update the rotated pixel's output accordingly. Simply
> replacing the variable does this.
> 
> The bug can be reproduced by setting a font with an unaligned width,
> such as sun12x22, like this:
> 
>   setfont sun12x22
>   echo 2 > /sys/class/graphics/fbcon/rotate
> 
> Without the fix, the font looks distorted.
> 
> Fixes: a30e9e6b018f ("lib/fonts: Refactor glyph-rotation helpers")
> Closes: https://lore.gitlab.freedesktop.org/drm-ai-reviews/review-patch7-20260407092555.58816-8-tzimmermann@suse.de/
> Cc: dri-devel@lists.freedesktop.org
> Cc: linux-fbdev@vger.kernel.org
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>   lib/fonts/font_rotate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

applied.
Thanks!
Helge

      reply	other threads:[~2026-04-28 12:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28  8:28 [PATCH] lib/fonts: Fix bit position when rotating by 180 degrees Thomas Zimmermann
2026-04-28 12:19 ` Helge Deller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ecc5e3c3-5afd-4c14-914c-8714b9278fa4@gmx.de \
    --to=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox