commit 93c3b64965bc2996c7a1a57fbcb5405f91860c77
parent 6f4e967deb346554f8137f46adecf5f59cc2507f
Author: Oriol Brufau <obrufau@igalia.com>
Date: Tue, 7 Oct 2025 12:23:19 +0000
Bug 1992880 - Enable font-synthesis-weight for Servo. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D267698
Diffstat:
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/servo/components/style/properties/cascade.rs b/servo/components/style/properties/cascade.rs
@@ -1074,7 +1074,6 @@ impl<'b> Cascade<'b> {
builder.add_flags(ComputedValueFlags::HAS_AUTHOR_SPECIFIED_WORD_SPACING);
}
- #[cfg(feature = "gecko")]
if self
.author_specified
.contains(LonghandId::FontSynthesisWeight)
diff --git a/servo/components/style/properties/longhands/font.mako.rs b/servo/components/style/properties/longhands/font.mako.rs
@@ -87,7 +87,7 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"font-synthesis-weight",
"FontSynthesis",
- engines="gecko",
+ engines="gecko servo",
initial_value="computed::FontSynthesis::Auto",
initial_specified_value="specified::FontSynthesis::Auto",
gecko_ffi_name="mFont.synthesisWeight",
diff --git a/servo/components/style/values/specified/font.rs b/servo/components/style/values/specified/font.rs
@@ -1526,6 +1526,7 @@ impl Parse for FontLanguageOverride {
Copy,
Debug,
Eq,
+ Hash,
MallocSizeOf,
Parse,
PartialEq,
@@ -1536,6 +1537,7 @@ impl Parse for FontLanguageOverride {
ToShmem,
ToTyped,
)]
+#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub enum FontSynthesis {
/// This attribute may be synthesized if not supported by a face.
Auto,