From 14b2537c15e993924a51d5d917bd5422c6ca4196 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Thu, 8 Apr 2021 01:00:13 -0700 Subject: [PATCH] fonts: restore listing of fonts in trace mode ``` WEZTERM_LOG=wezterm_font=trace,info wezterm ``` will list fonts found in font_dirs and the builtin fonts. It can't show all fonts found via the system locator, because that only has an interface for finding fonts by matching name, not listing all of them. --- wezterm-font/src/db.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wezterm-font/src/db.rs b/wezterm-font/src/db.rs index 5a8fc0428..03fab152a 100644 --- a/wezterm-font/src/db.rs +++ b/wezterm-font/src/db.rs @@ -122,6 +122,7 @@ impl FontDatabase { let mut db = Self::new(); db.load_font_info(font_info); + db.print_available(); Ok(db) } @@ -129,7 +130,7 @@ impl FontDatabase { let mut names = self.by_full_name.keys().collect::>(); names.sort(); for name in names { - log::debug!("available font: {}", name); + log::debug!("available font: wezterm.font(\"{}\") ", name); } } @@ -138,6 +139,7 @@ impl FontDatabase { load_built_in_fonts(&mut font_info)?; let mut db = Self::new(); db.load_font_info(font_info); + db.print_available(); Ok(db) }