mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Make FontPlugin::generic_font_name() return FlyString
This commit is contained in:
parent
13db3c5ce0
commit
4da1f4e836
Notes:
sideshowbarker
2024-07-17 06:20:50 +09:00
Author: https://github.com/awesomekling
Commit: 4da1f4e836
Pull-request: https://github.com/SerenityOS/serenity/pull/20969
Reviewed-by: https://github.com/shannonbooth
Reviewed-by: https://github.com/trflynn89
6 changed files with 23 additions and 23 deletions
|
@ -2001,7 +2001,7 @@ RefPtr<Gfx::Font const> StyleComputer::compute_font_for_style_values(DOM::Elemen
|
|||
|
||||
float const font_size_in_pt = font_size_in_px * 0.75f;
|
||||
|
||||
auto find_font = [&](String const& family) -> RefPtr<Gfx::Font const> {
|
||||
auto find_font = [&](FlyString const& family) -> RefPtr<Gfx::Font const> {
|
||||
font_selector = { family, font_size_in_pt, weight, width, slope };
|
||||
|
||||
FontFaceKey key {
|
||||
|
@ -2060,7 +2060,7 @@ RefPtr<Gfx::Font const> StyleComputer::compute_font_for_style_values(DOM::Elemen
|
|||
default:
|
||||
return {};
|
||||
}
|
||||
return find_font(String::from_deprecated_string(Platform::FontPlugin::the().generic_font_name(generic_font)).release_value_but_fixme_should_propagate_errors());
|
||||
return find_font(Platform::FontPlugin::the().generic_font_name(generic_font));
|
||||
};
|
||||
|
||||
RefPtr<Gfx::Font const> found_font;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue