{"record":{"id":"56d58bf22ca49c94","repo":"emilk/egui","slug":"fontfamily-family-is-not-bound-to-any-fonts","errorCode":null,"errorMessage":"FontFamily::{family:?} is not bound to any fonts","messagePattern":"FontFamily::(.+?) is not bound to any fonts","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/epaint/src/text/fonts.rs","lineNumber":1025,"sourceCode":"        self.atlas.options()\n    }\n\n    /// Take the recycled shaping buffer (or create a new one if already taken).\n    pub fn take_shape_buffer(&mut self) -> harfrust::UnicodeBuffer {\n        self.shape_buffer.take().unwrap_or_default()\n    }\n\n    /// 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        }","sourceCodeStart":1007,"sourceCodeEnd":1043,"githubUrl":"https://github.com/emilk/egui/blob/b9a0723d88dee87ba0965470b554a6efdab1d0bb/crates/epaint/src/text/fonts.rs#L1007-L1043","documentation":"Error \"FontFamily::{family:?} is not bound to any fonts\" thrown in emilk/egui.","triggerScenarios":"Thrown at crates/epaint/src/text/fonts.rs:1025 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Bind at least one font to this FontFamily in FontDefinitions::families before use."],"exampleFix":"fonts.families.entry(FontFamily::Proportional).or_default().push(\"MyFont\".to_owned());","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-14T00:17:10.932Z"}