mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb/CSS: Don't overwrite active font load when requesting a pt size
start_loading_next_url() is a no-op if there's a pending resource load, but not if that resource load has successfully loaded already. There is a delay between the font resource loading, and it being processed into a vector font. Calling font_with_point_size() in that gap would previously erase the previously-loaded font, if the font had multiple URLs to choose from. This fixes the icon font on mods.factorio.com :^)
This commit is contained in:
parent
b3edbd7bf2
commit
28388f1fd2
|
|
@ -228,7 +228,8 @@ void FontLoader::resource_did_load_or_fail()
|
|||
RefPtr<Gfx::Font> FontLoader::font_with_point_size(float point_size)
|
||||
{
|
||||
if (!m_vector_font) {
|
||||
start_loading_next_url();
|
||||
if (!resource())
|
||||
start_loading_next_url();
|
||||
return nullptr;
|
||||
}
|
||||
return m_vector_font->scaled_font(point_size);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user