From d4262dd1385fae8dce608afc31784fbd2671fa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20W=C3=BClker?= Date: Thu, 30 Apr 2026 14:09:27 +0200 Subject: [PATCH] style: Enable font-kerning for servo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon Wülker --- style/properties/longhands.toml | 1 - style/properties/shorthands.rs | 6 ++---- style/properties/shorthands.toml | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/style/properties/longhands.toml b/style/properties/longhands.toml index b2b03f3b2a..6be649772b 100644 --- a/style/properties/longhands.toml +++ b/style/properties/longhands.toml @@ -3659,7 +3659,6 @@ gecko_constant_prefix = "NS_FONT_VARIANT_CAPS" [font-kerning] struct = "font" -engine = "gecko" spec = "https://drafts.csswg.org/css-fonts/#propdef-font-kerning" animation_type = "discrete" affects = "layout" diff --git a/style/properties/shorthands.rs b/style/properties/shorthands.rs index 4f3345a171..b9914510cb 100644 --- a/style/properties/shorthands.rs +++ b/style/properties/shorthands.rs @@ -2517,12 +2517,12 @@ pub mod font { use super::*; #[cfg(feature = "gecko")] use crate::properties::longhands::{ - font_family, font_feature_settings, font_kerning, font_language_override, font_size, + font_family, font_feature_settings, font_language_override, font_size, font_size_adjust, font_variant_alternates, font_variant_east_asian, font_variant_emoji, font_variant_ligatures, font_variant_numeric, font_variant_position, }; use crate::properties::longhands::{ - font_optical_sizing, font_stretch, font_style, font_variant_caps, font_variation_settings, + font_kerning, font_optical_sizing, font_stretch, font_style, font_variant_caps, font_variation_settings, font_weight, }; #[cfg(feature = "gecko")] @@ -2623,7 +2623,6 @@ pub mod font { font_family: family, font_optical_sizing: font_optical_sizing::get_initial_specified_value(), font_variation_settings: font_variation_settings::get_initial_specified_value(), - #[cfg(feature = "gecko")] font_kerning: font_kerning::get_initial_specified_value(), #[cfg(feature = "gecko")] font_language_override: font_language_override::get_initial_specified_value(), @@ -2682,7 +2681,6 @@ pub mod font { } } - #[cfg(feature = "gecko")] if self.font_kerning != &font_kerning::get_initial_specified_value() { return Ok(()); } diff --git a/style/properties/shorthands.toml b/style/properties/shorthands.toml index 302de8ca38..f617bf6578 100644 --- a/style/properties/shorthands.toml +++ b/style/properties/shorthands.toml @@ -438,11 +438,11 @@ sub_properties = [ "line-height", "font-family", "font-optical-sizing", - "font-variation-settings" + "font-variation-settings", + "font-kerning" ] extra_gecko_sub_properties = [ "font-size-adjust", - "font-kerning", "font-variant-alternates", "font-variant-east-asian", "font-variant-emoji",