Lines Matching refs:font

386 			       const struct font_desc *font,  in draw_txt_rectangle()  argument
395 size_t font_pitch = DIV_ROUND_UP(font->width, 8); in draw_txt_rectangle()
398 msg_lines = min(msg_lines, drm_rect_height(clip) / font->height); in draw_txt_rectangle()
400 size_t line_len = min(msg[i].len, drm_rect_width(clip) / font->width); in draw_txt_rectangle()
402 rec.y1 = clip->y1 + i * font->height; in draw_txt_rectangle()
403 rec.y2 = rec.y1 + font->height; in draw_txt_rectangle()
407 rec.x1 += (drm_rect_width(clip) - (line_len * font->width)) / 2; in draw_txt_rectangle()
410 src = drm_draw_get_char_bitmap(font, msg[i].txt[j], font_pitch); in draw_txt_rectangle()
411 rec.x2 = rec.x1 + font->width; in draw_txt_rectangle()
413 rec.x1 += font->width; in draw_txt_rectangle()
418 static void drm_panic_logo_rect(struct drm_rect *rect, const struct font_desc *font) in drm_panic_logo_rect() argument
423 int logo_width = get_max_line_len(logo_ascii, logo_ascii_lines) * font->width; in drm_panic_logo_rect()
425 drm_rect_init(rect, 0, 0, logo_width, logo_ascii_lines * font->height); in drm_panic_logo_rect()
430 const struct font_desc *font, u32 fg_color) in drm_panic_logo_draw() argument
436 draw_txt_rectangle(sb, font, logo_ascii, logo_ascii_lines, false, rect, in drm_panic_logo_draw()
446 const struct font_desc *font = get_default_font(sb->width, sb->height, NULL, NULL); in draw_panic_static_user() local
450 if (!font) in draw_panic_static_user()
454 drm_panic_logo_rect(&r_logo, font); in draw_panic_static_user()
456 msg_width = min(get_max_line_len(panic_msg, panic_msg_lines) * font->width, sb->width); in draw_panic_static_user()
457 msg_height = min(panic_msg_lines * font->height, sb->height); in draw_panic_static_user()
467 drm_panic_logo_draw(sb, &r_logo, font, fg_color); in draw_panic_static_user()
469 draw_txt_rectangle(sb, font, panic_msg, panic_msg_lines, true, &r_msg, fg_color); in draw_panic_static_user()
476 static int draw_line_with_wrap(struct drm_scanout_buffer *sb, const struct font_desc *font, in draw_line_with_wrap() argument
479 int chars_per_row = sb->width / font->width; in draw_line_with_wrap()
486 draw_txt_rectangle(sb, font, &line_wrap, 1, false, &r_txt, fg_color); in draw_line_with_wrap()
487 r_txt.y1 -= font->height; in draw_line_with_wrap()
493 draw_txt_rectangle(sb, font, &line_wrap, 1, false, &r_txt, fg_color); in draw_line_with_wrap()
494 r_txt.y1 -= font->height; in draw_line_with_wrap()
499 draw_txt_rectangle(sb, font, line, 1, false, &r_txt, fg_color); in draw_line_with_wrap()
500 r_txt.y1 -= font->height; in draw_line_with_wrap()
515 const struct font_desc *font = get_default_font(sb->width, sb->height, NULL, NULL); in draw_panic_static_kmsg() local
523 if (!font) in draw_panic_static_kmsg()
526 yoffset = sb->height - font->height - (sb->height % font->height) / 2; in draw_panic_static_kmsg()
546 yoffset = draw_line_with_wrap(sb, font, &line, yoffset, fg_color); in draw_panic_static_kmsg()
703 const struct font_desc *font = get_default_font(sb->width, sb->height, NULL, NULL); in _draw_panic_static_qr_code() local
710 if (!font || !qrbuf1 || !qrbuf2 || !stream.workspace) in _draw_panic_static_qr_code()
715 drm_panic_logo_rect(&r_logo, font); in _draw_panic_static_qr_code()
717 msg_width = min(get_max_line_len(panic_msg, panic_msg_lines) * font->width, sb->width); in _draw_panic_static_qr_code()
718 msg_height = min(panic_msg_lines * font->height, sb->height); in _draw_panic_static_qr_code()
750 drm_panic_logo_draw(sb, &r_logo, font, fg_color); in _draw_panic_static_qr_code()
752 draw_txt_rectangle(sb, font, panic_msg, panic_msg_lines, true, &r_msg, fg_color); in _draw_panic_static_qr_code()