diff options
author | Andreas Kling <kling@serenityos.org> | 2023-03-03 19:32:19 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-04 00:29:38 +0100 |
commit | b71c7a6e44981c35ae93c91944e6cff70006285d (patch) | |
tree | 0b7fc5d68ed0559ecf6ce4db9a7f18f3334e3ee8 /Userland/Libraries/LibCards | |
parent | 93c9344e3558fee71deb5067e68146582891b319 (diff) | |
download | serenity-b71c7a6e44981c35ae93c91944e6cff70006285d.zip |
Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()
The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
Diffstat (limited to 'Userland/Libraries/LibCards')
-rw-r--r-- | Userland/Libraries/LibCards/CardPainter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCards/CardPainter.cpp b/Userland/Libraries/LibCards/CardPainter.cpp index 646ba1541a..a95f7f3f5a 100644 --- a/Userland/Libraries/LibCards/CardPainter.cpp +++ b/Userland/Libraries/LibCards/CardPainter.cpp @@ -201,7 +201,7 @@ void CardPainter::paint_card_front(Gfx::Bitmap& bitmap, Cards::Suit suit, Cards: paint_rect.set_height(paint_rect.height() / 2); paint_rect.shrink(10, 6); - auto text_rect = Gfx::IntRect { 4, 6, static_cast<int>(ceilf(font.width("10"sv))), font.glyph_height() }; + auto text_rect = Gfx::IntRect { 4, 6, static_cast<int>(ceilf(font.width("10"sv))), font.pixel_size_rounded_up() }; painter.draw_text(text_rect, card_rank_label(rank), font, Gfx::TextAlignment::Center, suit_color); painter.draw_bitmap( |