fix: temporarily disable font name with style for windows (#1054)

This commit is contained in:
Huang Xin 2025-05-07 00:29:27 +08:00 committed by GitHub
parent 8f0982ae33
commit 38101cb76d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,7 +53,12 @@ impl<R: Runtime> NativeBridge<R> {
let font_collection = font_enumeration::Collection::new().unwrap();
let mut fonts = HashMap::new();
for font in font_collection.all() {
fonts.insert(font.font_name.clone(), font.family_name.clone());
if cfg!(target_os = "windows") {
// FIXME: temporarily disable font name with style for windows
fonts.insert(font.family_name.clone(), font.family_name.clone());
} else {
fonts.insert(font.font_name.clone(), font.family_name.clone());
}
}
Ok(GetSysFontsListResponse { fonts, error: None })
}