mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
style: Refactor and add infrastructure for font metrics in style.
This commit itself only moves things around and adds an extra parameter to the `apply_declarations` function to eventually handle #14079 correctly. Probably needs a more granular API to query fonts, á la nsFontMetrics, but that's trivial to do once this is landed. Then we should make the font provider mandatory, and implement the missing stylo bits.
This commit is contained in:
parent
9fd6f0acd5
commit
6c3458767b
15 changed files with 196 additions and 94 deletions
|
@ -916,6 +916,14 @@ fn static_assert() {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn font_family_count(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn font_family_at(&self, _: usize) -> longhands::font_family::computed_value::FontFamily {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn copy_font_family_from(&mut self, other: &Self) {
|
||||
unsafe { Gecko_CopyFontFamilyFrom(&mut self.gecko.mFont, &other.gecko.mFont); }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue