diff --git a/assets/fonts/plex-mono/ZedPlexMono-Bold.ttf b/assets/fonts/plex-mono/ZedPlexMono-Bold.ttf new file mode 100644 index 0000000000..3d92a24341 Binary files /dev/null and b/assets/fonts/plex-mono/ZedPlexMono-Bold.ttf differ diff --git a/assets/fonts/plex-mono/ZedPlexMono-BoldItalic.ttf b/assets/fonts/plex-mono/ZedPlexMono-BoldItalic.ttf new file mode 100644 index 0000000000..ae303518fa Binary files /dev/null and b/assets/fonts/plex-mono/ZedPlexMono-BoldItalic.ttf differ diff --git a/assets/fonts/plex-mono/ZedPlexMono-Italic.ttf b/assets/fonts/plex-mono/ZedPlexMono-Italic.ttf new file mode 100644 index 0000000000..0da364e716 Binary files /dev/null and b/assets/fonts/plex-mono/ZedPlexMono-Italic.ttf differ diff --git a/assets/fonts/plex-mono/ZedPlexMono-Regular.ttf b/assets/fonts/plex-mono/ZedPlexMono-Regular.ttf new file mode 100644 index 0000000000..e48c8806d6 Binary files /dev/null and b/assets/fonts/plex-mono/ZedPlexMono-Regular.ttf differ diff --git a/assets/fonts/plex-mono/license.txt b/assets/fonts/plex-mono/license.txt new file mode 100644 index 0000000000..f72f76504c --- /dev/null +++ b/assets/fonts/plex-mono/license.txt @@ -0,0 +1,92 @@ +Copyright © 2017 IBM Corp. with Reserved Font Name "Plex" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/assets/fonts/plex-sans/ZedPlexSans-Bold.ttf b/assets/fonts/plex-sans/ZedPlexSans-Bold.ttf new file mode 100644 index 0000000000..0fc2982c65 Binary files /dev/null and b/assets/fonts/plex-sans/ZedPlexSans-Bold.ttf differ diff --git a/assets/fonts/plex-sans/ZedPlexSans-BoldItalic.ttf b/assets/fonts/plex-sans/ZedPlexSans-BoldItalic.ttf new file mode 100644 index 0000000000..666cb732b7 Binary files /dev/null and b/assets/fonts/plex-sans/ZedPlexSans-BoldItalic.ttf differ diff --git a/assets/fonts/plex-sans/ZedPlexSans-Italic.ttf b/assets/fonts/plex-sans/ZedPlexSans-Italic.ttf new file mode 100644 index 0000000000..6d90dd27bf Binary files /dev/null and b/assets/fonts/plex-sans/ZedPlexSans-Italic.ttf differ diff --git a/assets/fonts/plex-sans/ZedPlexSans-Regular.ttf b/assets/fonts/plex-sans/ZedPlexSans-Regular.ttf new file mode 100644 index 0000000000..f6a3f096fb Binary files /dev/null and b/assets/fonts/plex-sans/ZedPlexSans-Regular.ttf differ diff --git a/assets/fonts/plex-sans/license.txt b/assets/fonts/plex-sans/license.txt new file mode 100644 index 0000000000..f72f76504c --- /dev/null +++ b/assets/fonts/plex-sans/license.txt @@ -0,0 +1,92 @@ +Copyright © 2017 IBM Corp. with Reserved Font Name "Plex" + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. \ No newline at end of file diff --git a/assets/fonts/zed-mono/zed-mono-extended.ttf b/assets/fonts/zed-mono/zed-mono-extended.ttf deleted file mode 100644 index 05b8c7085e..0000000000 Binary files a/assets/fonts/zed-mono/zed-mono-extended.ttf and /dev/null differ diff --git a/assets/fonts/zed-mono/zed-mono-extendedbold.ttf b/assets/fonts/zed-mono/zed-mono-extendedbold.ttf deleted file mode 100644 index d5dde1bb14..0000000000 Binary files a/assets/fonts/zed-mono/zed-mono-extendedbold.ttf and /dev/null differ diff --git a/assets/fonts/zed-mono/zed-mono-extendedbolditalic.ttf b/assets/fonts/zed-mono/zed-mono-extendedbolditalic.ttf deleted file mode 100644 index bcd8c7e618..0000000000 Binary files a/assets/fonts/zed-mono/zed-mono-extendedbolditalic.ttf and /dev/null differ diff --git a/assets/fonts/zed-mono/zed-mono-extendeditalic.ttf b/assets/fonts/zed-mono/zed-mono-extendeditalic.ttf deleted file mode 100644 index 023c5a87ce..0000000000 Binary files a/assets/fonts/zed-mono/zed-mono-extendeditalic.ttf and /dev/null differ diff --git a/assets/fonts/zed-sans/zed-sans-extended.ttf b/assets/fonts/zed-sans/zed-sans-extended.ttf deleted file mode 100644 index 07a9685680..0000000000 Binary files a/assets/fonts/zed-sans/zed-sans-extended.ttf and /dev/null differ diff --git a/assets/fonts/zed-sans/zed-sans-extendedbold.ttf b/assets/fonts/zed-sans/zed-sans-extendedbold.ttf deleted file mode 100644 index 696c3cdd5b..0000000000 Binary files a/assets/fonts/zed-sans/zed-sans-extendedbold.ttf and /dev/null differ diff --git a/assets/fonts/zed-sans/zed-sans-extendedbolditalic.ttf b/assets/fonts/zed-sans/zed-sans-extendedbolditalic.ttf deleted file mode 100644 index 74cb8f7a3c..0000000000 Binary files a/assets/fonts/zed-sans/zed-sans-extendedbolditalic.ttf and /dev/null differ diff --git a/assets/fonts/zed-sans/zed-sans-extendeditalic.ttf b/assets/fonts/zed-sans/zed-sans-extendeditalic.ttf deleted file mode 100644 index 9460e5a7dd..0000000000 Binary files a/assets/fonts/zed-sans/zed-sans-extendeditalic.ttf and /dev/null differ diff --git a/assets/settings/default.json b/assets/settings/default.json index caaae18841..44c0200550 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -29,7 +29,7 @@ "inline_completion_provider": "copilot" }, // The name of a font to use for rendering text in the editor - "buffer_font_family": "Zed Mono", + "buffer_font_family": "Zed Plex Mono", // The OpenType features to enable for text in the editor. "buffer_font_features": { // Disable ligatures: @@ -51,7 +51,8 @@ // }, "buffer_line_height": "comfortable", // The name of a font to use for rendering text in the UI - "ui_font_family": ".SystemUIFont", + // (On macOS) You can set this to ".SysmtemUIFont" to use the system font + "ui_font_family": "Zed Plex Sans", // The OpenType features to enable for text in the UI "ui_font_features": { // Disable ligatures: @@ -409,7 +410,9 @@ // The list of language servers to use (or disable) for all languages. // // This is typically customized on a per-language basis. - "language_servers": ["..."], + "language_servers": [ + "..." + ], // When to automatically save edited buffers. This setting can // take four values. // @@ -544,7 +547,9 @@ }, "inline_completions": { // A list of globs representing files that inline completions should be disabled for. - "disabled_globs": [".env"] + "disabled_globs": [ + ".env" + ] }, // Settings specific to journaling "journal": { @@ -655,7 +660,12 @@ // Default directories to search for virtual environments, relative // to the current working directory. We recommend overriding this // in your project's settings, rather than globally. - "directories": [".env", "env", ".venv", "venv"], + "directories": [ + ".env", + "env", + ".venv", + "venv" + ], // Can also be `csh`, `fish`, and `nushell` "activate_script": "default" } @@ -669,7 +679,7 @@ // "font_size": 15, // Set the terminal's font family. If this option is not included, // the terminal will default to matching the buffer's font family. - // "font_family": "Zed Mono", + // "font_family": "Zed Plex Mono", // Sets the maximum number of lines in the terminal's scrollback buffer. // Default: 10_000, maximum: 100_000 (all bigger values set will be treated as 100_000), 0 disables the scrolling. // Existing terminals will not pick up this change until they are recreated. @@ -689,7 +699,10 @@ // } // "file_types": { - "JSONC": ["**/.zed/**/*.json", "**/zed/**/*.json"] + "JSONC": [ + "**/.zed/**/*.json", + "**/zed/**/*.json" + ] }, // The extensions that Zed should automatically install on startup. // @@ -703,7 +716,9 @@ "Astro": { "prettier": { "allowed": true, - "plugins": ["prettier-plugin-astro"] + "plugins": [ + "prettier-plugin-astro" + ] } }, "Blade": { @@ -723,7 +738,12 @@ } }, "Elixir": { - "language_servers": ["elixir-ls", "!next-ls", "!lexical", "..."] + "language_servers": [ + "elixir-ls", + "!next-ls", + "!lexical", + "..." + ] }, "Go": { "code_actions_on_format": { @@ -736,7 +756,12 @@ } }, "HEEX": { - "language_servers": ["elixir-ls", "!next-ls", "!lexical", "..."] + "language_servers": [ + "elixir-ls", + "!next-ls", + "!lexical", + "..." + ] }, "HTML": { "prettier": { @@ -746,11 +771,17 @@ "Java": { "prettier": { "allowed": true, - "plugins": ["prettier-plugin-java"] + "plugins": [ + "prettier-plugin-java" + ] } }, "JavaScript": { - "language_servers": ["!typescript-language-server", "vtsls", "..."], + "language_servers": [ + "!typescript-language-server", + "vtsls", + "..." + ], "prettier": { "allowed": true } @@ -769,11 +800,17 @@ "PHP": { "prettier": { "allowed": true, - "plugins": ["@prettier/plugin-php"] + "plugins": [ + "@prettier/plugin-php" + ] } }, "Ruby": { - "language_servers": ["solargraph", "!ruby-lsp", "..."] + "language_servers": [ + "solargraph", + "!ruby-lsp", + "..." + ] }, "SCSS": { "prettier": { @@ -783,17 +820,25 @@ "SQL": { "prettier": { "allowed": true, - "plugins": ["prettier-plugin-sql"] + "plugins": [ + "prettier-plugin-sql" + ] } }, "Svelte": { "prettier": { "allowed": true, - "plugins": ["prettier-plugin-svelte"] + "plugins": [ + "prettier-plugin-svelte" + ] } }, "TSX": { - "language_servers": ["!typescript-language-server", "vtsls", "..."], + "language_servers": [ + "!typescript-language-server", + "vtsls", + "..." + ], "prettier": { "allowed": true } @@ -804,7 +849,11 @@ } }, "TypeScript": { - "language_servers": ["!typescript-language-server", "vtsls", "..."], + "language_servers": [ + "!typescript-language-server", + "vtsls", + "..." + ], "prettier": { "allowed": true } @@ -817,7 +866,9 @@ "XML": { "prettier": { "allowed": true, - "plugins": ["@prettier/plugin-xml"] + "plugins": [ + "@prettier/plugin-xml" + ] } }, "YAML": { diff --git a/crates/assets/src/assets.rs b/crates/assets/src/assets.rs index d46cdb3a20..f9284bca86 100644 --- a/crates/assets/src/assets.rs +++ b/crates/assets/src/assets.rs @@ -52,4 +52,13 @@ impl Assets { cx.text_system().add_fonts(embedded_fonts) } + + pub fn load_test_fonts(&self, cx: &AppContext) { + cx.text_system() + .add_fonts(vec![self + .load("fonts/plex-mono/ZedPlexMono-Regular.ttf") + .unwrap() + .unwrap()]) + .unwrap() + } } diff --git a/crates/editor/src/display_map/block_map.rs b/crates/editor/src/display_map/block_map.rs index 40cd4a48d7..db9a770fc8 100644 --- a/crates/editor/src/display_map/block_map.rs +++ b/crates/editor/src/display_map/block_map.rs @@ -1221,7 +1221,7 @@ mod tests { use super::*; use crate::display_map::inlay_map::InlayMap; use crate::display_map::{fold_map::FoldMap, tab_map::TabMap, wrap_map::WrapMap}; - use gpui::{div, font, px, AssetSource, Element}; + use gpui::{div, font, px, Element}; use multi_buffer::MultiBuffer; use rand::prelude::*; use settings::SettingsStore; @@ -2014,12 +2014,7 @@ mod tests { let settings = SettingsStore::test(cx); cx.set_global(settings); theme::init(theme::LoadThemes::JustBase, cx); - cx.text_system() - .add_fonts(vec![assets::Assets - .load("fonts/zed-mono/zed-mono-extended.ttf") - .unwrap() - .unwrap()]) - .unwrap(); + assets::Assets.load_test_fonts(cx); } impl TransformBlock { diff --git a/crates/editor/src/editor_tests.rs b/crates/editor/src/editor_tests.rs index 384b045f3f..11bf98cc4b 100644 --- a/crates/editor/src/editor_tests.rs +++ b/crates/editor/src/editor_tests.rs @@ -10,8 +10,8 @@ use crate::{ }; use futures::StreamExt; use gpui::{ - div, AssetSource, SemanticVersion, TestAppContext, UpdateGlobal, VisualTestContext, - WindowBounds, WindowOptions, + div, SemanticVersion, TestAppContext, UpdateGlobal, VisualTestContext, WindowBounds, + WindowOptions, }; use indoc::indoc; use language::{ @@ -12489,12 +12489,7 @@ pub(crate) fn update_test_project_settings( pub(crate) fn init_test(cx: &mut TestAppContext, f: fn(&mut AllLanguageSettingsContent)) { _ = cx.update(|cx| { - cx.text_system() - .add_fonts(vec![assets::Assets - .load("fonts/zed-mono/zed-mono-extended.ttf") - .unwrap() - .unwrap()]) - .unwrap(); + assets::Assets.load_test_fonts(cx); let store = SettingsStore::test(cx); cx.set_global(store); theme::init(theme::LoadThemes::JustBase, cx); diff --git a/crates/editor/src/test.rs b/crates/editor/src/test.rs index cf568522b1..5081971efe 100644 --- a/crates/editor/src/test.rs +++ b/crates/editor/src/test.rs @@ -25,7 +25,7 @@ pub fn marked_display_snapshot( let (unmarked_text, markers) = marked_text_offsets(text); let font = Font { - family: "Zed Mono".into(), + family: "Zed Plex Mono".into(), features: FontFeatures::default(), weight: FontWeight::default(), style: FontStyle::default(), diff --git a/crates/editor/src/test/editor_lsp_test_context.rs b/crates/editor/src/test/editor_lsp_test_context.rs index fe13b62450..f1f8fa676b 100644 --- a/crates/editor/src/test/editor_lsp_test_context.rs +++ b/crates/editor/src/test/editor_lsp_test_context.rs @@ -10,7 +10,7 @@ use serde_json::json; use crate::{Editor, ToPoint}; use collections::HashSet; use futures::Future; -use gpui::{AssetSource, View, ViewContext, VisualTestContext}; +use gpui::{View, ViewContext, VisualTestContext}; use indoc::indoc; use language::{ point_to_lsp, FakeLspAdapter, Language, LanguageConfig, LanguageMatcher, LanguageQueries, @@ -39,12 +39,7 @@ impl EditorLspTestContext { let app_state = cx.update(AppState::test); cx.update(|cx| { - cx.text_system() - .add_fonts(vec![assets::Assets - .load("fonts/zed-mono/zed-mono-extended.ttf") - .unwrap() - .unwrap()]) - .unwrap(); + assets::Assets.load_test_fonts(cx); language::init(cx); crate::init(cx); workspace::init(app_state.clone(), cx); diff --git a/crates/gpui/src/platform/cosmic_text/text_system.rs b/crates/gpui/src/platform/cosmic_text/text_system.rs index 1931d93d8b..dc7bf6ca5f 100644 --- a/crates/gpui/src/platform/cosmic_text/text_system.rs +++ b/crates/gpui/src/platform/cosmic_text/text_system.rs @@ -205,7 +205,7 @@ impl CosmicTextSystemState { ) -> Result> { // TODO: Determine the proper system UI font. let name = if name == ".SystemUIFont" { - "Zed Sans" + "Zed Plex Sans" } else { name }; diff --git a/crates/gpui/src/text_system.rs b/crates/gpui/src/text_system.rs index 8c6dcb50ca..5a414c216c 100644 --- a/crates/gpui/src/text_system.rs +++ b/crates/gpui/src/text_system.rs @@ -64,7 +64,7 @@ impl TextSystem { fallback_font_stack: smallvec![ // TODO: This is currently Zed-specific. // We should allow GPUI users to provide their own fallback font stack. - font("Zed Mono"), + font("Zed Plex Mono"), font("Helvetica"), font("Cantarell"), // Gnome font("Ubuntu"), // Gnome (Ubuntu) diff --git a/crates/gpui/src/text_system/line_wrapper.rs b/crates/gpui/src/text_system/line_wrapper.rs index 28e450d9b4..34c5ddd773 100644 --- a/crates/gpui/src/text_system/line_wrapper.rs +++ b/crates/gpui/src/text_system/line_wrapper.rs @@ -154,12 +154,12 @@ mod tests { let cx = TestAppContext::new(dispatcher, None); cx.text_system() .add_fonts(vec![std::fs::read( - "../../assets/fonts/zed-mono/zed-mono-extended.ttf", + "../../assets/fonts/plex-mono/ZedPlexMono-Regular.ttf", ) .unwrap() .into()]) .unwrap(); - let id = cx.text_system().font_id(&font("Zed Mono")).unwrap(); + let id = cx.text_system().font_id(&font("Zed Plex Mono")).unwrap(); cx.update(|cx| { let text_system = cx.text_system().clone(); diff --git a/crates/markdown/examples/markdown.rs b/crates/markdown/examples/markdown.rs index 89e6fc5d17..3161d57183 100644 --- a/crates/markdown/examples/markdown.rs +++ b/crates/markdown/examples/markdown.rs @@ -109,13 +109,13 @@ pub fn main() { MARKDOWN_EXAMPLE.to_string(), MarkdownStyle { code_block: gpui::TextStyleRefinement { - font_family: Some("Zed Mono".into()), + font_family: Some("Zed Plex Mono".into()), color: Some(cx.theme().colors().editor_foreground), background_color: Some(cx.theme().colors().editor_background), ..Default::default() }, inline_code: gpui::TextStyleRefinement { - font_family: Some("Zed Mono".into()), + font_family: Some("Zed Plex Mono".into()), // @nate: Could we add inline-code specific styles to the theme? color: Some(cx.theme().colors().editor_foreground), background_color: Some(cx.theme().colors().editor_background), diff --git a/crates/recent_projects/src/dev_servers.rs b/crates/recent_projects/src/dev_servers.rs index 440f609f4e..2f7c0d9be2 100644 --- a/crates/recent_projects/src/dev_servers.rs +++ b/crates/recent_projects/src/dev_servers.rs @@ -116,7 +116,7 @@ impl DevServerProjects { let markdown_style = MarkdownStyle { code_block: gpui::TextStyleRefinement { - font_family: Some("Zed Mono".into()), + font_family: Some("Zed Plex Mono".into()), color: Some(cx.theme().colors().editor_foreground), background_color: Some(cx.theme().colors().editor_background), ..Default::default() diff --git a/crates/storybook/src/storybook.rs b/crates/storybook/src/storybook.rs index 77cbca099f..a8997498a5 100644 --- a/crates/storybook/src/storybook.rs +++ b/crates/storybook/src/storybook.rs @@ -117,7 +117,7 @@ impl Render for StoryWrapper { .flex() .flex_col() .size_full() - .font_family("Zed Mono") + .font_family("Zed Plex Mono") .child(self.story.clone()) } } diff --git a/crates/zed/src/zed.rs b/crates/zed/src/zed.rs index e7f1c7e936..15fef998b0 100644 --- a/crates/zed/src/zed.rs +++ b/crates/zed/src/zed.rs @@ -3111,11 +3111,11 @@ mod tests { cx.text_system() .add_fonts(vec![ Assets - .load("fonts/zed-sans/zed-sans-extended.ttf") + .load("fonts/plex-mono/ZedPlexMono-Regular.ttf") .unwrap() .unwrap(), Assets - .load("fonts/zed-mono/zed-mono-extended.ttf") + .load("fonts/plex-sans/ZedPlexSans-Regular.ttf") .unwrap() .unwrap(), ]) diff --git a/crates/zed/src/zed/linux_prompts.rs b/crates/zed/src/zed/linux_prompts.rs index 3a8065d931..fdcfbdc124 100644 --- a/crates/zed/src/zed/linux_prompts.rs +++ b/crates/zed/src/zed/linux_prompts.rs @@ -3,6 +3,8 @@ use gpui::{ InteractiveElement, IntoElement, ParentElement, PromptHandle, PromptLevel, PromptResponse, Render, RenderablePromptHandle, Styled, ViewContext, VisualContext, WindowContext, }; +use settings::Settings; +use theme::ThemeSettings; use ui::{ h_flex, v_flex, ButtonCommon, ButtonStyle, Clickable, ElevationIndex, FluentBuilder, LabelSize, TintColor, @@ -56,6 +58,8 @@ impl FallbackPromptRenderer { } impl Render for FallbackPromptRenderer { fn render(&mut self, cx: &mut ViewContext) -> impl IntoElement { + let settings = ThemeSettings::get_global(cx); + let font_family = settings.ui_font.family.clone(); let prompt = v_flex() .key_context("Prompt") .cursor_default() @@ -67,7 +71,7 @@ impl Render for FallbackPromptRenderer { .overflow_hidden() .p_4() .gap_4() - .font_family("Zed Sans") + .font_family(font_family) .child( div() .w_full() diff --git a/docs/src/configuring-zed.md b/docs/src/configuring-zed.md index 5177d9622c..413d0489ff 100644 --- a/docs/src/configuring-zed.md +++ b/docs/src/configuring-zed.md @@ -96,7 +96,7 @@ Here are all the currently available settings. - Description: The name of a font to use for rendering text in the editor. - Setting: `buffer_font_family` -- Default: `Zed Mono` +- Default: `Zed Plex Mono` **Options** @@ -1596,7 +1596,7 @@ Run the `theme selector: toggle` action in the command palette to see a current "soft_wrap": "none", "buffer_font_size": 18, - "buffer_font_family": "Zed Mono", + "buffer_font_family": "Zed Plex Mono", "autosave": "on_focus_change", "format_on_save": "off",