zed-industries/zed · error
{err}
Error message
{err} What it means
Pass-through of the underlying platform text system error in TextSystem::font_id's helper clone_font_id_result: resolving the FontId for a requested Font failed (unknown family, unregistered font, or style lookup failure).
Source
Thrown at crates/gpui/src/text_system.rs:107
/// Includes fonts registered with [`Self::add_fonts`].
pub fn all_font_names(&self) -> Vec<String> {
let mut names = self.platform_text_system.all_font_names();
names.sort_unstable();
names.dedup();
names
}
/// Add a font's data to the text system.
pub fn add_fonts(&self, fonts: Vec<Cow<'static, [u8]>>) -> Result<()> {
self.platform_text_system.add_fonts(fonts)
}
/// Get the FontId for the configure font family and style.
fn font_id(&self, font: &Font) -> Result<FontId> {
fn clone_font_id_result(font_id: &Result<FontId>) -> Result<FontId> {
match font_id {
Ok(font_id) => Ok(*font_id),
Err(err) => Err(anyhow!("{err}")),
}
}
let font_id = self
.font_ids_by_font
.read()
.get(font)
.map(clone_font_id_result);
if let Some(font_id) = font_id {
font_id
} else {
let font_id = self.platform_text_system.font_id(font);
self.font_ids_by_font
.write()
.insert(font.clone(), clone_font_id_result(&font_id));
font_id
}
}View on GitHub (pinned to 9d272b0363)
Solutions
- Check that required fonts are registered via add_fonts before text layout
- Verify the font family/style requested actually exists on the system
- Inspect the embedded `err` (platform text system error) for the concrete cause
- Fall back to a default font family if the requested one is unavailable
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/gpui/src/text_system.rs:111 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20).
Data as JSON: /api/errors/d0ce2c0e79ff085c.
Report an issue: GitHub.