Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix macOS system font fallback cascade append (#58020)

Tiou Lims486cf9ef3c08
diff --git a/crates/gpui_macos/src/open_type.rs b/crates/gpui_macos/src/open_type.rs
index 048ba13dd13..8a30508de25 100644
--- a/crates/gpui_macos/src/open_type.rs
+++ b/crates/gpui_macos/src/open_type.rs
@@ -125,12 +125,12 @@ fn append_system_fallbacks(fallback_array: CFMutableArrayRef, font_ref: CTFontRe
let default_fallbacks: CFArray<CTFontDescriptor> =
CFArray::wrap_under_create_rule(default_fallbacks);
- default_fallbacks
+ for desc in default_fallbacks
.iter()
.filter(|desc| desc.font_path().is_some())
- .map(|desc| {
- CFArrayAppendValue(fallback_array, desc.as_concrete_TypeRef() as _);
- });
+ {
+ CFArrayAppendValue(fallback_array, desc.as_concrete_TypeRef() as _);
+ }
}
}