1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 08:17:34 +00:00

LibGfx: Make Font::width() return a float

This commit is contained in:
Andreas Kling 2023-01-03 14:43:07 +01:00
parent b9d2b8f7b2
commit 3407ab0fd1
25 changed files with 40 additions and 40 deletions

View file

@ -211,7 +211,7 @@ void ColorLines::paint_event(GUI::PaintEvent& event)
// Draw score
auto const score_text = MUST(String::formatted("{:05}"sv, m_score));
auto text_width { m_score_font->width(score_text) };
auto text_width = static_cast<int>(ceilf(m_score_font->width(score_text)));
auto const glyph_height = m_score_font->glyph_height();
auto const score_text_rect = Gfx::IntRect {
frame_inner_rect().top_left().translated(text_margin),