mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/panic: 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-4-tzimmermann@suse.de
This commit is contained in:
parent
26cda6f065
commit
5b508d25d3
|
|
@ -443,9 +443,11 @@ static void draw_txt_rectangle(struct drm_scanout_buffer *sb,
|
|||
rec.x1 += (drm_rect_width(clip) - (line_len * font->width)) / 2;
|
||||
|
||||
for (j = 0; j < line_len; j++) {
|
||||
src = drm_draw_get_char_bitmap(font, msg[i].txt[j], font_pitch);
|
||||
src = font_data_glyph_buf(font->data, font->width, font->height,
|
||||
(unsigned char)msg[i].txt[j]);
|
||||
rec.x2 = rec.x1 + font->width;
|
||||
drm_panic_blit(sb, &rec, src, font_pitch, 1, color);
|
||||
if (src)
|
||||
drm_panic_blit(sb, &rec, src, font_pitch, 1, color);
|
||||
rec.x1 += font->width;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user