Switch to the system UI font on macOS (#10317)

To reference the system font, use the special ".SystemUIFont" family
name.

/cc @PixelJanitor 

Release Notes:

- Switched to the system UI  font for user interface elements on macOS.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Nathan Sobo 2024-04-09 06:44:57 -07:00 committed by GitHub
parent 8205c52d2b
commit 414058379b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 10 deletions

View file

@ -210,9 +210,16 @@ impl LinuxTextSystemState {
#[profiling::function]
fn load_family(
&mut self,
name: &SharedString,
name: &str,
_features: FontFeatures,
) -> Result<SmallVec<[FontId; 4]>> {
// TODO: Determine the proper system UI font.
let name = if name == ".SystemUIFont" {
"Zed Sans"
} else {
name
};
let mut font_ids = SmallVec::new();
let families = self
.font_system