mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-30 21:16:23 +00:00
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
83ad28dfe7
Related comment on issue https://github.com/zed-industries/zed/issues/14222#issuecomment-2418375056 On `crates/gpui/src/platform/linux/text_system.rs` on method `CosmicTextSystem::new` `load_system_fonts` is being called twice: ```rust pub(crate) fn new() -> Self { let mut font_system = FontSystem::new(); // todo(linux) make font loading non-blocking font_system.db_mut().load_system_fonts(); Self(RwLock::new(CosmicTextSystemState { font_system, swash_cache: SwashCache::new(), scratch: ShapeBuffer::default(), loaded_fonts_store: Vec::new(), font_ids_by_family_cache: HashMap::default(), postscript_names: HashMap::default(), })) } ``` First one on `FontSystem::new()` and second one is explicit on `font_system.db_mut().load_system_fonts()`. The first call `FontSystem::new()` is defined as: ``` pub fn new() -> Self { Self::new_with_fonts(core::iter::empty()) } ``` And `new_with_fonts`: ```rust /// Create a new [`FontSystem`] with a pre-specified set of fonts. pub fn new_with_fonts(fonts: impl IntoIterator<Item = fontdb::Source>) -> Self { let locale = Self::get_locale(); log::debug!("Locale: {}", locale); let mut db = fontdb::Database::new(); //TODO: configurable default fonts db.set_monospace_family("Fira Mono"); db.set_sans_serif_family("Fira Sans"); db.set_serif_family("DejaVu Serif"); Self::load_fonts(&mut db, fonts.into_iter()); Self::new_with_locale_and_db(locale, db) } ``` Finally `Self::load_fonts(&mut db, fonts.into_iter())` calls `load_system_fonts`: ```rust #[cfg(feature = "std")] fn load_fonts(db: &mut fontdb::Database, fonts: impl Iterator<Item = fontdb::Source>) { #[cfg(not(target_arch = "wasm32"))] let now = std::time::Instant::now(); db.load_system_fonts(); for source in fonts { db.load_font_source(source); } ... ``` Release Notes: - Remove duplicate font loading on Linux |
||
---|---|---|
.cargo | ||
.cloudflare | ||
.config | ||
.github | ||
.zed | ||
assets | ||
crates | ||
docs | ||
extensions | ||
legal | ||
nix | ||
script | ||
tooling/xtask | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
Cargo.lock | ||
Cargo.toml | ||
clippy.toml | ||
CODE_OF_CONDUCT.md | ||
compose.yml | ||
CONTRIBUTING.md | ||
Cross.toml | ||
debug.plist | ||
default.nix | ||
docker-compose.sql | ||
Dockerfile-collab | ||
Dockerfile-collab.dockerignore | ||
Dockerfile-cross | ||
Dockerfile-cross.dockerignore | ||
Dockerfile-distros | ||
Dockerfile-distros.dockerignore | ||
flake.lock | ||
flake.nix | ||
LICENSE-AGPL | ||
LICENSE-APACHE | ||
LICENSE-GPL | ||
livekit.yaml | ||
Procfile | ||
Procfile.postgrest | ||
README.md | ||
renovate.json | ||
rust-toolchain.toml | ||
shell.nix | ||
typos.toml |
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS and Linux you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Windows (tracking issue)
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about
to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specified
error for a crate you've created? If so, addpublish = false
under[package]
in your crate's Cargo.toml. - Is the error
failed to satisfy license requirements
for a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theaccepted
array inscript/licenses/zed-licenses.toml
. - Is
cargo-about
unable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml
, as specified in the cargo-about book.