diff --git a/components/fonts/platform/windows/font.rs b/components/fonts/platform/windows/font.rs index db7c94cd85a..6621d6cc9a3 100644 --- a/components/fonts/platform/windows/font.rs +++ b/components/fonts/platform/windows/font.rs @@ -167,7 +167,7 @@ impl PlatformFontMethods for PlatformFont { }; let weight = StyleFontWeight::from_float(weight_val as f32); - let stretch = match min(9, max(1, width_val)) { + let stretch = match width_val.clamp(1, 9) { 1 => StyleFontStretch::ULTRA_CONDENSED, 2 => StyleFontStretch::EXTRA_CONDENSED, 3 => StyleFontStretch::CONDENSED,