Skip to content

Commit

Permalink
Merge pull request #1605 from h3poteto/fix/font-error
Browse files Browse the repository at this point in the history
Put error when failing to get font families
  • Loading branch information
h3poteto authored Sep 16, 2024
2 parents b6536c9 + ec64c8a commit 462072c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
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

0 comments on commit 462072c

Please sign in to comment.