mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
fonts: Add support for WOFF2 and properly load web fonts from @imports (#31879)
This change also makes two fixes that are necessary to get WOFF2 fonts working: 1. It adds support for loading web fonts from stylesheets included via @import rules. 2. It ensure that when web fonts are loaded synchronusly they invalidate the font cache. This led to incorrect font rendering when running tests before. Fixes #31598.
This commit is contained in:
parent
b55d0a2053
commit
8dece05980
100 changed files with 196 additions and 218 deletions
|
@ -186,6 +186,10 @@ impl FetchResponseListener for StylesheetContext {
|
|||
Some(&loader),
|
||||
win.css_error_reporter(),
|
||||
);
|
||||
|
||||
// Layout knows about this stylesheet, because Stylo added it to the Stylist,
|
||||
// but Layout doesn't know about any new web fonts that it contains.
|
||||
document.load_web_fonts_from_stylesheet(stylesheet.clone());
|
||||
},
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue