-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibWeb/CSS: Add valid default font if no font can be found #2955
base: master
Are you sure you want to change the base?
Conversation
I was expecting my unit test to fail on macOS. Wow! It passes!! |
This looks like it solves the issue, but it's a little messy: There are now basically 2 "last resort" fonts: The one set as last resort, and this extra one appended to the fonts list. Maybe we just shouldn't have a |
My read:
Opinion:
|
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest |
- Before: If a font cannot found based on style values, e.g. if the family is incorrect (try 'lolol'), then the list of found fonts contains only the default emoji font. - After: The default font of the Font plugin is added to the top of an empty list of computed fonts. This way, we're failing gracefully on author error, and we still display emojis :]m
The name `found_font` was misleading. It was probably an artifact from simpler times, when only one font could be found; before `font_list`,
- Before: the default emoji font was picked up. The text was split into five fragments (3 text; 2 whitespace) and the whitespace was probably extended to match the font metrics. - After: the whole text is layed out into one fragment. NOTE: - This test may not work on the Apple platform: expect font metrics for the default emoji font to be different from Ubuntu, although the layout should be the same. - The test works reliably in the test runner `headless-browser -R`, however, it generates different layout metrics compared to running stand-alone in dump mode `headless-browser -d`.
Fixes #2787