mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
stylo: System font support for font-weight
This commit is contained in:
parent
5b06a32032
commit
4a899530be
4 changed files with 40 additions and 7 deletions
|
@ -1371,10 +1371,7 @@ 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) }
|
||||
unsafe { longhands::font_weight::computed_value::T::from_gecko_weight(self.gecko.mFont.weight) }
|
||||
}
|
||||
|
||||
pub fn set_font_synthesis(&mut self, v: longhands::font_synthesis::computed_value::T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue