diff --git a/crates/fonts/src/fontdb.rs b/crates/fonts/src/fontdb.rs index f67ff59..8fdc744 100644 --- a/crates/fonts/src/fontdb.rs +++ b/crates/fonts/src/fontdb.rs @@ -356,6 +356,13 @@ pub fn system_font_dirs() -> Vec { } } } + // Microsoft Office bundles its fonts (Calibri, Cambria, …) inside each app; read them in + // place from the first installed one (they share the same set). + let office = ["Microsoft Word", "Microsoft Excel", "Microsoft PowerPoint", "Microsoft Outlook"] + .iter() + .map(|app| std::path::PathBuf::from(format!("/Applications/{app}.app/Contents/Resources/DFonts"))) + .find(|p| p.is_dir()); + dirs.extend(office); } else if cfg!(windows) { let root = std::env::var_os("WINDIR").map(std::path::PathBuf::from).unwrap_or_else(|| "C:\\Windows".into()); dirs.push(root.join("Fonts"));