From c2f49c8422a9bc67ee75aa742dcd866278299ced Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 10 Jun 2024 08:49:52 -0600 Subject: [PATCH] Only list font names once --- src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index bf4d3ba..ded50dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1255,7 +1255,9 @@ impl Application for App { .families .first() .map_or_else(|| face.post_script_name.to_string(), |x| x.0.to_string()); - font_names.push(font_name); + if !font_names.contains(&font_name) { + font_names.push(font_name); + } } } font_names.sort();