mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Allow nonstandard font-weight values for system fonts
This commit is contained in:
parent
a35c8f08e2
commit
9c6f11c965
2 changed files with 8 additions and 6 deletions
|
@ -2022,10 +2022,8 @@ fn static_assert() {
|
|||
${impl_simple_copy('font_weight', 'mFont.weight')}
|
||||
|
||||
pub fn clone_font_weight(&self) -> longhands::font_weight::computed_value::T {
|
||||
debug_assert!(self.gecko.mFont.weight >= 100);
|
||||
debug_assert!(self.gecko.mFont.weight <= 900);
|
||||
debug_assert!(self.gecko.mFont.weight % 10 == 0);
|
||||
unsafe { transmute(self.gecko.mFont.weight) }
|
||||
debug_assert!(self.gecko.mFont.weight <= ::std::u16::MAX);
|
||||
longhands::font_weight::computed_value::T(self.gecko.mFont.weight)
|
||||
}
|
||||
|
||||
${impl_simple_type_with_conversion("font_synthesis", "mFont.synthesis")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue