mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
font_cache: Handle filtering @font-face
rules in Servo (#31601)
Instead of letting Stylo filter `@font-face` rules, handle this filtering in Servo. It doesn't make sense that Stylo knows about what fonts Servo supports. This also cleans up a bit the way that this is handled, giving an entire stylesheet of rules to the font cache to process instead of letting each layout thread walk the rules. This brings more of the font-related code into the FontCacheThread itself. This is the first step toward adding WOFF2 support and fixing various web font related bugs.
This commit is contained in:
parent
b03411f567
commit
45344dca2b
15 changed files with 182 additions and 219 deletions
|
@ -24,6 +24,7 @@ use style::values::computed::font::{
|
|||
FamilyName, FontFamily, FontFamilyList, FontFamilyNameSyntax, FontSize, FontStretch, FontStyle,
|
||||
FontWeight, SingleFontFamily,
|
||||
};
|
||||
use style::values::computed::FontLanguageOverride;
|
||||
use webrender_api::{FontInstanceKey, FontKey, IdNamespace};
|
||||
|
||||
struct TestFontSource {
|
||||
|
@ -100,6 +101,7 @@ fn style() -> FontStyleStruct {
|
|||
font_size: FontSize::medium(),
|
||||
font_stretch: FontStretch::hundred(),
|
||||
hash: 0,
|
||||
font_language_override: FontLanguageOverride::normal(),
|
||||
};
|
||||
style.compute_font_hash();
|
||||
style
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue