From 2a676dfad837d1784ed0911d314bc263804ef4ef Mon Sep 17 00:00:00 2001 From: Chris Copeland Date: Fri, 15 Jul 2022 14:56:26 -0700 Subject: Fix thin strokes on macOS Remove the `font.use_thin_strokes` config, which only did anything on macOS and only prior to Big Sur. Instead, we will enable or disable "font smoothing" on macOS based on the `AppleFontSmoothing` user default. These changes let users get the "thin strokes" behavior by setting `AppleFontSmoothing` to 0 with: ```sh $ defaults write -g AppleFontSmoothing -int 0 ``` (Or replace `-g` with `org.alacritty` to apply this setting only to Alacritty.app, rather than the whole system.) Add a `removed` config attribute to show helpful warnings to users who are using config options that don't do anything anymore, and apply this attribute to `font.use_thin_strokes`. Bump `crossfont` to 0.5.0 to pick up the new font smoothing behavior. This release also includes a fix for a crash when trying to load a disabled font. Fixes #4616. Fixes #6108. --- alacritty_config_derive/src/de_struct.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'alacritty_config_derive/src') diff --git a/alacritty_config_derive/src/de_struct.rs b/alacritty_config_derive/src/de_struct.rs index ceb32fd9..cf7ea141 100644 --- a/alacritty_config_derive/src/de_struct.rs +++ b/alacritty_config_derive/src/de_struct.rs @@ -135,14 +135,14 @@ fn field_deserializer(field_streams: &mut FieldStreams, field: &Field) -> Result config.#ident = serde::Deserialize::deserialize(unused).unwrap_or_default(); }); }, - "deprecated" => { - // Construct deprecation message and append optional attribute override. - let mut message = format!("Config warning: {} is deprecated", literal); + "deprecated" | "removed" => { + // Construct deprecation/removal message with optional attribute override. + let mut message = format!("Config warning: {} has been {}", literal, parsed.ident); if let Some(warning) = parsed.param { message = format!("{}; {}", message, warning.value()); } - // Append stream to log deprecation warning. + // Append stream to log deprecation/removal warning. match_assignment_stream.extend(quote! { log::warn!(target: #LOG_TARGET, #message); }); -- cgit