mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/client: log: Look up glyph shape with font helper
Look up glyph shapes with font_data_glyph_buf(). Handle non-existing glyphs gracefully. Enable extended ASCII by casting to unsigned char. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://patch.msgid.link/20260529140759.529929-3-tzimmermann@suse.de
This commit is contained in:
parent
98a6cabfd8
commit
26cda6f065
|
|
@ -122,10 +122,12 @@ static void drm_log_draw_line(struct drm_log_scanout *scanout, const char *s,
|
|||
iosys_map_incr(&map, r.y1 * fb->pitches[0]);
|
||||
for (i = 0; i < len && i < scanout->columns; i++) {
|
||||
u32 color = (i < prefix_len) ? scanout->prefix_color : scanout->front_color;
|
||||
src = 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 = 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user