{"record":{"id":"6c84a903e8042c63","repo":"wezterm/wezterm","slug":"to-resolve-pane-selection-font","errorCode":null,"errorMessage":"to resolve pane selection font","messagePattern":"to resolve pane selection font","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wezterm-gui/src/termwindow/paneselect.rs","lineNumber":61,"sourceCode":"            element: RefCell::new(None),\n            labels: RefCell::new(vec![]),\n            selection: RefCell::new(String::new()),\n            alphabet,\n            mode: args.mode,\n            was_zoomed,\n            show_pane_ids: args.show_pane_ids,\n        }\n    }\n\n    fn compute(\n        term_window: &mut TermWindow,\n        alphabet: &str,\n        show_pane_ids: bool,\n    ) -> anyhow::Result<(Vec<ComputedElement>, Vec<String>)> {\n        let font = term_window\n            .fonts\n            .pane_select_font()\n            .expect(\"to resolve pane selection font\");\n        let metrics = RenderMetrics::with_font_metrics(&font.metrics());\n\n        let top_bar_height = if term_window.show_tab_bar && !term_window.config.tab_bar_at_bottom {\n            term_window.tab_bar_pixel_height().unwrap()\n        } else {\n            0.\n        };\n        let (padding_left, padding_top) = term_window.padding_left_top();\n        let border = term_window.get_os_border();\n        let top_pixel_y = top_bar_height + padding_top + border.top.get() as f32;\n\n        let panes = term_window.get_panes_to_render();\n        let labels =\n            crate::overlay::quickselect::compute_labels_for_alphabet(alphabet, panes.len());\n\n        let mut elements = vec![];\n        for pos in panes {\n            let caption = if show_pane_ids {","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/wezterm/wezterm/blob/3ff7522b9617ec920f7fbdb22b57e93d42d93ee9/wezterm-gui/src/termwindow/paneselect.rs#L43-L79","documentation":"PaneSelect::compute resolves the overlay font via fonts.pane_select_font() (Entity::PaneSelect, same font machinery as the command palette) and .expect(\"to resolve pane selection font\")s the anyhow::Result. Any failure in font selection/loading therefore becomes a panic exactly when the Pane Select overlay is computed, rather than a reportable error, even though compute() returns anyhow::Result and could propagate it.","triggerScenarios":"Entering pane-select mode on a setup where the overlay font cannot be resolved: missing font family, unsatisfiable font_rules, stale font cache entries pointing at deleted files, or a font that fails to parse under FreeType/CoreText/DirectWrite.","commonSituations":"Custom fonts uninstalled after the config was written; per-user font installs not visible to the session; heavily customized window_frame/fonts blocks; systems where the font enumeration backend errors out.","solutions":["Verify the configured font families exist on the system (fc-list :family / Font Book / Windows font settings)","Remove or simplify custom font_rules and window_frame font overrides and retest the overlay","Clear wezterm's font cache and restart to re-enumerate installed fonts","Reinstall or repair the target font, then reopen pane select"],"exampleFix":"// before\nlet font = term_window.fonts.pane_select_font().expect(\"to resolve pane selection font\");\n\n// after\nlet font = term_window.fonts.pane_select_font().context(\"pane select font\")?;","handlingStrategy":"try-catch","validationCode":"// Fail loudly at startup, not when the user opens pane select\nfn overlay_fonts_ok(fonts: &wezterm_font::Fonts) -> bool {\n    fonts.pane_select_font().is_ok()\n}","typeGuard":null,"tryCatchPattern":"match term_window.fonts.pane_select_font() {\n    Ok(font) => RenderMetrics::with_font_metrics(&font.metrics()),\n    Err(err) => {\n        log::error!(\"pane select font unresolved: {err:#}\");\n        anyhow::bail!(\"cannot compute pane selector without a font\")\n    }\n}","preventionTips":["Pre-warm entity fonts during startup so failures surface in logs immediately","Keep font_rules satisfiable: test with a minimal config after edits","Install fonts system-wide when configs are shared across users","Watch wezterm logs for font-resolution warnings before they become overlay panics"],"tags":["fonts","pane-selector","panic","font-config","overlay"],"backgroundTag":"font-load-failure","analyzedSha":"3ff7522b9617ec920f7fbdb22b57e93d42d93ee9","analyzedAt":"2026-08-20T04:47:31.434Z","contentChangedAt":"2026-08-20T04:47:31.434Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}