mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
If the font-family property is set to a StyleValueList, we now iterate through it, looking up each font in turn until one is found. StyleResolver no longer needs to handle FontFamily specifically, which is a nice bonus. Serenity's current dependence on bitmap fonts leads to some weirdness here - for example, the `if (!found_font)` path can trigger even if a generic font family like "sans-serif" is used, since our default sans-serif font might not be available in the desired size or weight. The `monospace` variable only exists for that reason. This is not a complete solution, by a long way! Serenity's font support is still quite basic, so more work needs to be done there before we can start implementing the spec's font-matching algorithm. But this is still an improvement. :^)