LibWeb: Insert default font in font list before emoji font

This fixes a bug where, if a non-existent font family is specified in
CSS, whitespaces would be rendered using the emoji font, while letters
would use the default font. This issue occurred because the font was
resolved separately for each code point. Since the emoji font was listed
before the default font, it was chosen for whitespace characters due to
its inclusion of whitespace glyphs (at least in the Apple Color Emoji
font on macOS). This change resolves the issue by placing the default
font before the emoji font in the list.
This commit is contained in:
Aliaksandr Kalenik 2025-01-02 04:48:23 +03:00 committed by Andreas Kling
commit c7d6a7aafb
Notes: github-actions[bot] 2025-01-02 09:48:18 +00:00
3 changed files with 26 additions and 8 deletions

View file

@ -0,0 +1,5 @@
<style>
* {
font-family: "some fake font name";
}
</style>the same font is supposed to be used for all characters including whitespaces