{"record":{"id":"130cf0b44a9c0b88","repo":"emilk/egui","slug":"no-font-data-found-for-font-name","errorCode":null,"errorMessage":"No font data found for {font_name:?}","messagePattern":"No font data found for (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/epaint/src/text/fonts.rs","lineNumber":1033,"sourceCode":"    /// Return a shaping buffer for reuse.\n    pub fn return_shape_buffer(&mut self, buffer: harfrust::UnicodeBuffer) {\n        self.shape_buffer = Some(buffer);\n    }\n\n    /// Get the right font implementation from [`FontFamily`].\n    pub fn font(&mut self, family: &FontFamily) -> Font<'_> {\n        let cached_family = self.family_cache.entry(family.clone()).or_insert_with(|| {\n            let fonts = &self.definitions.families.get(family);\n            let fonts =\n                fonts.unwrap_or_else(|| panic!(\"FontFamily::{family:?} is not bound to any fonts\"));\n\n            let fonts: Vec<FontFaceKey> = fonts\n                .iter()\n                .map(|font_name| {\n                    *self\n                        .fonts_by_name\n                        .get(font_name)\n                        .unwrap_or_else(|| panic!(\"No font data found for {font_name:?}\"))\n                })\n                .collect();\n\n            CachedFamily::new(fonts, &mut self.fonts_by_id)\n        });\n        Font {\n            fonts_by_id: &mut self.fonts_by_id,\n            cached_family,\n            atlas: &mut self.atlas,\n        }\n    }\n}\n\n// ----------------------------------------------------------------------------\n\nstruct CachedGalley {\n    /// When it was last used\n    last_used: u32,","sourceCodeStart":1015,"sourceCodeEnd":1051,"githubUrl":"https://github.com/emilk/egui/blob/b9a0723d88dee87ba0965470b554a6efdab1d0bb/crates/epaint/src/text/fonts.rs#L1015-L1051","documentation":"Error \"No font data found for {font_name:?}\" thrown in emilk/egui.","triggerScenarios":"Thrown at crates/epaint/src/text/fonts.rs:1033 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register the font under that name in FontDefinitions::font_data before referencing it in a family list.","Fix a typo: the name in families must exactly match the key used in font_data."],"exampleFix":"fonts.font_data.insert(\"MyFont\".to_owned(), FontData::from_static(MY_FONT_BYTES).into());","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b9a0723d88dee87ba0965470b554a6efdab1d0bb","analyzedAt":"2026-08-19T12:39:57.743Z","contentChangedAt":"2026-08-19T12:39:57.743Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}