fix: compatibility fix for some formerly imported corrupted metadata (#307)

* fix: compatibility fix for some formerly imported corrupted metadata

* fix: use font family names of sys fonts
This commit is contained in:
Huang Xin
2025-02-07 02:53:30 +01:00
parent 023ba663e3
commit adfdb10d8e
9 changed files with 17 additions and 11 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ async fn list_fonts() -> Result<Vec<String>, String> {
let font_collection = font_enumeration::Collection::new().unwrap();
let mut fonts = Vec::new();
for font in font_collection.all() {
fonts.push(font.font_name.clone());
fonts.push(font.family_name.clone());
}
Ok(fonts)
}