From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/client: log: Look up glyph shape with font helper Date: Thu, 04 Jun 2026 16:27:41 +1000 Message-ID: In-Reply-To: <20260529140759.529929-3-tzimmermann@suse.de> References: <20260529140759.529929-1-tzimmermann@suse.de> <20260529140759.529929-3-tzimmermann@suse.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Converts `drm_log_draw_line()` in `drm_log.c`: ```c - src =3D drm_draw_get_char_bitmap(font, s[i], font_pitch); - drm_log_blit(&map, fb->pitches[0], src, font_pitch, - scanout->scaled_font_h, scanout->scaled_font_w, - px_width, color); + src =3D font_data_glyph_buf(font->data, font->width, font->height, + (unsigned char)s[i]); + if (src) + drm_log_blit(&map, fb->pitches[0], src, font_pitch, + scanout->scaled_font_h, scanout->scaled_font_w, + px_width, color); iosys_map_incr(&map, scanout->scaled_font_w * px_width); ``` The `(unsigned char)` cast on `s[i]` is correct =E2=80=94 `s` is `const cha= r *`, and casting to `unsigned char` converts the range from [-128, 127] to= [0, 255] before widening to `unsigned int`. The `iosys_map_incr()` call remains outside the `if (src)` block, which is = correct =E2=80=94 it advances the cursor position unconditionally, so a mis= sing glyph leaves a blank space rather than causing subsequent characters t= o shift left. **No bugs. Looks good.** --- Generated by Claude Code Patch Reviewer