mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:38:10 +00:00
LibGfx: Make Font::width() return a float
This commit is contained in:
parent
b9d2b8f7b2
commit
3407ab0fd1
25 changed files with 40 additions and 40 deletions
|
@ -2443,7 +2443,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, 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))), static_cast<int>(ceilf(font.pixel_size())) };
|
||||
text_rect.align_within(rect, text_alignment);
|
||||
|
||||
draw_text(text_rect, name_to_draw, font, text_alignment, color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue