Closes #20381 Release Notes: - Fixed password dialog for remote server showing ligatures
Unified · Split
| @@ -7,6 +7,11 @@ use schemars::schema::{InstanceType, SchemaObject}; · 6 unmodified lines | ||
| 7 | 7 | pub struct FontFeatures(pub Arc<Vec<(String, u32)>>); |
| 8 | 8 | |
| 9 | 9 | impl FontFeatures { |
| 10 | + /// Disables `calt`. | |
| 11 | + pub fn disable_ligatures() -> Self { | |
| 12 | + Self(Arc::new(vec![("calt".into(), 0)])) | |
| 13 | + } | |
| 14 | + | |
| 10 | 15 | /// Get the tag name list of the font OpenType features |
| 11 | 16 | /// only enabled or disabled features are returned |
| 12 | 17 | pub fn tag_value_list(&self) -> &[(String, u32)] { |
| @@ -7,8 +7,8 @@ use editor::Editor; · 6 unmodified lines | ||
| 7 | 7 | use futures::channel::oneshot; |
| 8 | 8 | use gpui::{ |
| 9 | 9 | percentage, Animation, AnimationExt, AnyWindowHandle, AsyncAppContext, DismissEvent, |
| 10 | − EventEmitter, FocusableView, ParentElement as _, PromptLevel, Render, SemanticVersion, | |
| 11 | − SharedString, Task, TextStyleRefinement, Transformation, View, WeakView, | |
| 10 | + EventEmitter, FocusableView, FontFeatures, ParentElement as _, PromptLevel, Render, | |
| 11 | + SemanticVersion, SharedString, Task, TextStyleRefinement, Transformation, View, WeakView, | |
| 12 | 12 | }; |
| 13 | 13 | use gpui::{AppContext, Model}; |
| 14 | 14 | |
| @@ -178,6 +178,7 @@ impl SshPrompt { · 163 unmodified lines | ||
| 178 | 178 | let mut text_style = cx.text_style(); |
| 179 | 179 | let refinement = TextStyleRefinement { |
| 180 | 180 | font_family: Some(theme.buffer_font.family.clone()), |
| 181 | + font_features: Some(FontFeatures::disable_ligatures()), | |
| 181 | 182 | font_size: Some(theme.buffer_font_size.into()), |
| 182 | 183 | color: Some(cx.theme().colors().editor_foreground), |
| 183 | 184 | background_color: Some(gpui::transparent_black()), |