Commit Graph

9 Commits

Author SHA1 Message Date
Kendall Garner 515cadb916 Better cross platform font handling (#2104)
* fix: better handling of custom font

Practically speaking, custom font seems to have only worked on Linux, because
`net.fetch` would include the mime type in the response headers which could validate the payload.
This doesn't appear to be the case on windows/macOS. Instead:

1. On Linux (or if some other system supports it), check the content type. If good, serve as normal
2. Otherwise, fetch the payload. Read the first four to five bytes and check for a valid magic number.

Additionally, to prevent arbitrary requests fetching other paths via injected content, sync the custom font path
to the main process, and then make _every_ request to `feishin:/` point to the same renderer path.
When setting the font, first send the path to the main process. This will register `feishin:/` to point
to the path provided. This is done via a promise-based set.

Finally, provide a default value for the file input (a best effort approximation for the last part of the file path)
on the file input component.

* make the linter happy
2026-06-02 19:34:16 +00:00
Jeff e2a1d813a9 Use proper casing for i18n locales (#1998) 2026-05-11 19:42:07 -07:00
jeffvli a63763bfe8 use dev path for local settings store 2026-01-18 18:53:21 -08:00
jeffvli 8ba87d57cd fix default lyrics fetchers 2025-12-28 20:05:37 -08:00
jeffvli c9cd87bae5 remove release_channel from settings sync 2025-12-15 23:17:47 -08:00
jeffvli 9a8cb45510 Revert "prevent autoupdater from setting release channel (#1396)"
This reverts commit 614761efd7.
2025-12-15 23:06:25 -08:00
jeffvli 614761efd7 prevent autoupdater from setting release channel (#1396) 2025-12-15 18:12:16 -08:00
jeffvli 154f0180e1 fix potential infinite updater loop due to stale settings sync state 2025-12-15 11:27:17 -08:00
jeffvli 303eba87ca add a hook to sync main settings with renderer 2025-12-14 15:13:57 -08:00