|
@@ -1381,8 +1381,8 @@ void Painter::draw_emoji(IntPoint point, Gfx::Bitmap const& emoji, Font const& f
|
|
|
IntRect dst_rect {
|
|
|
point.x(),
|
|
|
point.y(),
|
|
|
- static_cast<int>(ceilf(font.pixel_size() * emoji.width() / emoji.height())),
|
|
|
- static_cast<int>(ceilf(font.pixel_size())),
|
|
|
+ font.pixel_size_rounded_up() * emoji.width() / emoji.height(),
|
|
|
+ font.pixel_size_rounded_up(),
|
|
|
};
|
|
|
draw_scaled_bitmap(dst_rect, emoji, emoji.rect());
|
|
|
}
|
|
@@ -2461,7 +2461,7 @@ void Gfx::Painter::draw_ui_text(Gfx::IntRect const& rect, StringView text, Gfx::
|
|
|
Optional<size_t> underline_offset;
|
|
|
auto name_to_draw = parse_ampersand_string(text, &underline_offset);
|
|
|
|
|
|
- Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(name_to_draw))), static_cast<int>(ceilf(font.pixel_size())) };
|
|
|
+ Gfx::IntRect text_rect { 0, 0, static_cast<int>(ceilf(font.width(name_to_draw))), font.pixel_size_rounded_up() };
|
|
|
text_rect.align_within(rect, text_alignment);
|
|
|
|
|
|
draw_text(text_rect, name_to_draw, font, text_alignment, color);
|