Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put error when failing to get font families #1605

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fedistar",
"version": "1.9.10",
"version": "1.9.11",
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "next dev -p 1420",
Expand Down
6 changes: 5 additions & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,11 @@ async fn open_media(app_handle: AppHandle, media_url: String) -> () {
#[tauri::command]
async fn list_fonts() -> Result<Vec<String>, String> {
let font_source = SystemSource::new();
let fonts = font_source.all_families().expect("failed to list fonts");
let fonts = font_source.all_families().map_err(|e| {
let err = e.to_string();
tracing::error!("Failed to get font families {}", err);
err
})?;

Ok(fonts)
}
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"package": {
"productName": "fedistar",
"version": "1.9.10"
"version": "1.9.11"
},
"tauri": {
"allowlist": {
Expand Down