mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 17:02:56 +00:00
LibGfx: Convert Font APIs to return String instead of DeprecatedString
This commit is contained in:
parent
4e9dc127ae
commit
545d8336b8
Notes:
sideshowbarker
2024-07-16 21:34:08 +09:00
Author: https://github.com/awesomekling
Commit: 545d8336b8
Pull-request: https://github.com/SerenityOS/serenity/pull/20969
Reviewed-by: https://github.com/shannonbooth
Reviewed-by: https://github.com/trflynn89
29 changed files with 106 additions and 104 deletions
|
@ -21,7 +21,7 @@ RefPtr<Gfx::Font const> FontCache::get(FontSelector const& font_selector) const
|
|||
NonnullRefPtr<Gfx::Font const> FontCache::scaled_font(Gfx::Font const& font, float scale_factor)
|
||||
{
|
||||
auto device_font_pt_size = font.point_size() * scale_factor;
|
||||
FontSelector font_selector = { FlyString::from_deprecated_fly_string(font.family()).release_value_but_fixme_should_propagate_errors(), device_font_pt_size, font.weight(), font.width(), font.slope() };
|
||||
FontSelector font_selector = { font.family(), device_font_pt_size, font.weight(), font.width(), font.slope() };
|
||||
if (auto cached_font = get(font_selector)) {
|
||||
return *cached_font;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue