assets/fonts/plex-mono/ZedPlexMono-Bold.ttf 🔗
Conrad Irwin created
Release Notes:
- Changed the default fonts to IBM Plex Sans and IBM Plex Mono. If you'd
like to go back to using Zed Sans/Zed mono you need to
[download](https://github.com/zed-industries/zed-fonts/releases/tag/1.2.0)
them and install them.
assets/fonts/plex-mono/ZedPlexMono-Bold.ttf | 0
assets/fonts/plex-mono/ZedPlexMono-BoldItalic.ttf | 0
assets/fonts/plex-mono/ZedPlexMono-Italic.ttf | 0
assets/fonts/plex-mono/ZedPlexMono-Regular.ttf | 0
assets/fonts/plex-mono/license.txt | 92 +++++++++++++
assets/fonts/plex-sans/ZedPlexSans-Bold.ttf | 0
assets/fonts/plex-sans/ZedPlexSans-BoldItalic.ttf | 0
assets/fonts/plex-sans/ZedPlexSans-Italic.ttf | 0
assets/fonts/plex-sans/ZedPlexSans-Regular.ttf | 0
assets/fonts/plex-sans/license.txt | 92 +++++++++++++
assets/fonts/zed-mono/zed-mono-extended.ttf | 0
assets/fonts/zed-mono/zed-mono-extendedbold.ttf | 0
assets/fonts/zed-mono/zed-mono-extendedbolditalic.ttf | 0
assets/fonts/zed-mono/zed-mono-extendeditalic.ttf | 0
assets/fonts/zed-sans/zed-sans-extended.ttf | 0
assets/fonts/zed-sans/zed-sans-extendedbold.ttf | 0
assets/fonts/zed-sans/zed-sans-extendedbolditalic.ttf | 0
assets/fonts/zed-sans/zed-sans-extendeditalic.ttf | 0
assets/settings/default.json | 89 +++++++++--
crates/assets/src/assets.rs | 9 +
crates/editor/src/display_map/block_map.rs | 9
crates/editor/src/editor_tests.rs | 11 -
crates/editor/src/test.rs | 2
crates/editor/src/test/editor_lsp_test_context.rs | 9
crates/gpui/src/platform/cosmic_text/text_system.rs | 2
crates/gpui/src/text_system.rs | 2
crates/gpui/src/text_system/line_wrapper.rs | 4
crates/markdown/examples/markdown.rs | 4
crates/recent_projects/src/dev_servers.rs | 2
crates/storybook/src/storybook.rs | 2
crates/zed/src/zed.rs | 4
crates/zed/src/zed/linux_prompts.rs | 6
docs/src/configuring-zed.md | 4
33 files changed, 288 insertions(+), 55 deletions(-)
@@ -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.
@@ -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.
@@ -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": {
@@ -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()
+ }
}
@@ -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 {
@@ -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);
@@ -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(),
@@ -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);
@@ -205,7 +205,7 @@ impl CosmicTextSystemState {
) -> Result<SmallVec<[FontId; 4]>> {
// TODO: Determine the proper system UI font.
let name = if name == ".SystemUIFont" {
- "Zed Sans"
+ "Zed Plex Sans"
} else {
name
};
@@ -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)
@@ -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();
@@ -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),
@@ -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()
@@ -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())
}
}
@@ -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(),
])
@@ -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<Self>) -> 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()
@@ -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",