{"record":{"id":"d0ce2c0e79ff085c","repo":"zed-industries/zed","slug":"err-d0ce2c","errorCode":null,"errorMessage":"{err}","messagePattern":"\\{err\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui/src/text_system.rs","lineNumber":107,"sourceCode":"    /// Includes fonts registered with [`Self::add_fonts`].\n    pub fn all_font_names(&self) -> Vec<String> {\n        let mut names = self.platform_text_system.all_font_names();\n        names.sort_unstable();\n        names.dedup();\n        names\n    }\n\n    /// Add a font's data to the text system.\n    pub fn add_fonts(&self, fonts: Vec<Cow<'static, [u8]>>) -> Result<()> {\n        self.platform_text_system.add_fonts(fonts)\n    }\n\n    /// Get the FontId for the configure font family and style.\n    fn font_id(&self, font: &Font) -> Result<FontId> {\n        fn clone_font_id_result(font_id: &Result<FontId>) -> Result<FontId> {\n            match font_id {\n                Ok(font_id) => Ok(*font_id),\n                Err(err) => Err(anyhow!(\"{err}\")),\n            }\n        }\n\n        let font_id = self\n            .font_ids_by_font\n            .read()\n            .get(font)\n            .map(clone_font_id_result);\n        if let Some(font_id) = font_id {\n            font_id\n        } else {\n            let font_id = self.platform_text_system.font_id(font);\n            self.font_ids_by_font\n                .write()\n                .insert(font.clone(), clone_font_id_result(&font_id));\n            font_id\n        }\n    }","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui/src/text_system.rs#L89-L125","documentation":"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).","triggerScenarios":"Thrown at crates/gpui/src/text_system.rs:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}