-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
[feature]: Support using system fonts #304
[feature]: Support using system fonts #304
Conversation
Uses the **experimental** queryLocalFonts API, when prompted, to get the fonts and do CSS. Resolves jeffvli#270 and jeffvli#288 (by proxy) Caveats/notes: - This is experimental, and is only supported by Chrome/Chromium/Edgeium (see https://caniuse.com/?search=querylocalfonts) - As far as I can tell, the only way to dynamically change the font (shown in https://wicg.github.io/local-font-access/#example-style-with-local-fonts) was by DOM manipulation; css variables did not seem to work - This shows **all** fonts, including their variants (bold/italic/etc); given that the style names could be localized, not sure of a way to parse this (on my system, for instance, I had 859 different combinations) - I made fonts a separate top-level setting because it was easier to manipulate without causing as many rerenders; feel free to put that back
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Is it possible to add option to use "System default" font instead of choosing from every font installed? Or this option is already included to this PR? |
As far as I can tell, there's no way for the browser to tell this. Draft spec here: https://wicg.github.io/local-font-access/#dom-window-querylocalfonts. |
Perhaps it would be better to give the user the option to "upload" a custom font(s) to the app rather than querying all installing fonts using unstable API? |
Since the font api has been in chrome since 103 (last year), I'd say it's stable there. I've added an Electron-only workaround that will allow providing a custom font by adding a custom protocol ( |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/jeffvli/feishin](https://togithub.com/jeffvli/feishin) | minor | `0.4.1` -> `0.5.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>jeffvli/feishin (ghcr.io/jeffvli/feishin)</summary> ### [`v0.5.0`](https://togithub.com/jeffvli/feishin/releases/tag/v0.5.0): 0.5.0 [Compare Source](https://togithub.com/jeffvli/feishin/compare/v0.4.1...v0.5.0) 0.5.0 is here! This release introduces localization (multi-language) support which is now hosted on [weblate](https://hosted.weblate.org/projects/feishin/). Visit the link if you would like to contribute a translation. ##### Added - Added localization support via weblate ([#​74](https://togithub.com/jeffvli/feishin/issues/74)) - Added discord rich presence ([#​72](https://togithub.com/jeffvli/feishin/issues/72)) - Added `amd64`, `arm64`, and `armv7` Docker images ([#​336](https://togithub.com/jeffvli/feishin/issues/336)) (Thanks [@​bubylou](https://togithub.com/bubylou)) - Added animated play indicator to currently playing track ([#​237](https://togithub.com/jeffvli/feishin/issues/237)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Added `PUBLIC_PATH` Docker environment variable to allow customizing the path Feishin is served from ([#​307](https://togithub.com/jeffvli/feishin/issues/307)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Added system and custom font support ([#​270](https://togithub.com/jeffvli/feishin/issues/270), [#​288](https://togithub.com/jeffvli/feishin/issues/288)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Added customizable primary accent color ([#​282](https://togithub.com/jeffvli/feishin/issues/282)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Added customizable playback speed ([#​94](https://togithub.com/jeffvli/feishin/issues/94)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Added additional hotkeys ([#​326](https://togithub.com/jeffvli/feishin/issues/326)) (Thanks [@​GermanDarknes](https://togithub.com/GermanDarknes)) - Favorite/unfavorite current song - Favorite/unfavorite previous song ##### Changed - Changed `Rating` component functionality from \[double click to clear] -> \[click on the same rating to clear] ([#​332](https://togithub.com/jeffvli/feishin/issues/332)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - (Jellyfin) Change hardcoded Jellyfin DeviceID values to include hostname and username ([#​312](https://togithub.com/jeffvli/feishin/issues/312)) (Thanks [@​LilyRose2798](https://togithub.com/LilyRose2798)) - Fullscreen player now uses dynamic image resolution based on window size ([#​290](https://togithub.com/jeffvli/feishin/issues/290)) (Thanks [@​TacoCake](https://togithub.com/TacoCake)) - Poster carousel now resets to initial position on data refresh ([#​285](https://togithub.com/jeffvli/feishin/issues/285)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - (Navidrome) Artist images are now always attmepted to be fetched even when it is potentially unvailable ([#​317](https://togithub.com/jeffvli/feishin/issues/317)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Window title now displays `SONG_NAME — ARTIST_NAME` instead of `SONG_NAME` ##### Fixed - (MPV player) Fixed MPV playing the same track twice after toggling repeat ([#​292](https://togithub.com/jeffvli/feishin/issues/292)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - (WEB player) Fixed queue not pausing on the last track when repeat is disabled ([#​291](https://togithub.com/jeffvli/feishin/issues/291)) - (Navidrome) Fixed artist year filter becoming stuck ([#​299](https://togithub.com/jeffvli/feishin/issues/299)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - (Navidrome) Fixed smart playlist query editor unable to scroll ([#​322](https://togithub.com/jeffvli/feishin/issues/322)) - (Jellyfin) Fixed playing songs from global search menu ([#​294](https://togithub.com/jeffvli/feishin/issues/294)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - (Jellyfin) Fixed playlist fetch implementation (reverted to previous) - (Jellyfin) Fixed missing `Play count` filter on Jellyfin album sort - (Jellyfin) Fixed "edit playlist" form not working due to invalid fetch ([#​327](https://togithub.com/jeffvli/feishin/issues/327)) - Removed unused CORS and SSL toggle from web UI ([#​305](https://togithub.com/jeffvli/feishin/issues/305)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Fixed add to playlist logic when attempting to skip duplicates ([#​300](https://togithub.com/jeffvli/feishin/issues/300)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Fixed current track queue position when removing songs from the queue ([#​226](https://togithub.com/jeffvli/feishin/issues/226)) (Thanks [@​kgarner7](https://togithub.com/kgarner7)) - Fixed `rate 0` hotkey not working ([#​338](https://togithub.com/jeffvli/feishin/issues/338)) (Thanks [@​GermanDarknes](https://togithub.com/GermanDarknes)) **Full Changelog**: jeffvli/feishin@v0.4.0...v0.4.1 #### What's Changed - \[bugfix]: Fix MPV player playing the same track twice after toggling repeat by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/292](https://togithub.com/jeffvli/feishin/pull/292) - \[bugfix]: fix artist discography year filter not clearing by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/299](https://togithub.com/jeffvli/feishin/pull/299) - \[bugfix]: Replace hardcoded Jellyfin authentication DeviceId to include hostname and username by [@​LilyRose2798](https://togithub.com/LilyRose2798) in [https://github.com/jeffvli/feishin/pull/312](https://togithub.com/jeffvli/feishin/pull/312) - \[bugfix]: remove ignore CORS/SSL switches from web version by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/305](https://togithub.com/jeffvli/feishin/pull/305) - In the fullscreen player use dynamic resolution for the main image by [@​TacoCake](https://togithub.com/TacoCake) in [https://github.com/jeffvli/feishin/pull/290](https://togithub.com/jeffvli/feishin/pull/290) - \[bugfix]: properly implement Jellyfin getSongDetail by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/298](https://togithub.com/jeffvli/feishin/pull/298) - \[bugfix]: do not duplicate tracks when adding to multiple playlists by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/300](https://togithub.com/jeffvli/feishin/pull/300) - \[feature]: support running feishin on custom path by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/307](https://togithub.com/jeffvli/feishin/pull/307) - Reset Carousel position on data refresh by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/303](https://togithub.com/jeffvli/feishin/pull/303) - \[Remote] Full PWA support, misc bugfixes by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/280](https://togithub.com/jeffvli/feishin/pull/280) - add more emphasis to current song by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/283](https://togithub.com/jeffvli/feishin/pull/283) - \[bugfix]: fix queue offset when removing tracks by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/301](https://togithub.com/jeffvli/feishin/pull/301) - \[feature]: Support using system fonts by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/304](https://togithub.com/jeffvli/feishin/pull/304) - \[bugfix/feat]: always fetch artist image for Navidrome by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/317](https://togithub.com/jeffvli/feishin/pull/317) - \[Feature] Support changing accent/primary color by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/282](https://togithub.com/jeffvli/feishin/pull/282) - Support changing playback rate by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/275](https://togithub.com/jeffvli/feishin/pull/275) - Add favorite hotkey options by [@​GermanDarknes](https://togithub.com/GermanDarknes) in [https://github.com/jeffvli/feishin/pull/326](https://togithub.com/jeffvli/feishin/pull/326) - \[bugfix/feature]: Improve ratings by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/332](https://togithub.com/jeffvli/feishin/pull/332) - \[bugfix]: prevent default by [@​kgarner7](https://togithub.com/kgarner7) in [https://github.com/jeffvli/feishin/pull/334](https://togithub.com/jeffvli/feishin/pull/334) - Build docker container for arm by [@​bubylou](https://togithub.com/bubylou) in [https://github.com/jeffvli/feishin/pull/336](https://togithub.com/jeffvli/feishin/pull/336) - Fix clear rating hotkey by [@​GermanDarknes](https://togithub.com/GermanDarknes) in [https://github.com/jeffvli/feishin/pull/338](https://togithub.com/jeffvli/feishin/pull/338) - Add localization support by [@​jeffvli](https://togithub.com/jeffvli) in [https://github.com/jeffvli/feishin/pull/333](https://togithub.com/jeffvli/feishin/pull/333) #### New Contributors - [@​LilyRose2798](https://togithub.com/LilyRose2798) made their first contribution in [https://github.com/jeffvli/feishin/pull/312](https://togithub.com/jeffvli/feishin/pull/312) - [@​TacoCake](https://togithub.com/TacoCake) made their first contribution in [https://github.com/jeffvli/feishin/pull/290](https://togithub.com/jeffvli/feishin/pull/290) - [@​GermanDarknes](https://togithub.com/GermanDarknes) made their first contribution in [https://github.com/jeffvli/feishin/pull/326](https://togithub.com/jeffvli/feishin/pull/326) - [@​bubylou](https://togithub.com/bubylou) made their first contribution in [https://github.com/jeffvli/feishin/pull/336](https://togithub.com/jeffvli/feishin/pull/336) **Full Changelog**: jeffvli/feishin@v0.4.1...v0.5.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNi4zIiwidXBkYXRlZEluVmVyIjoiMzcuMzYuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
Uses the experimental queryLocalFonts API, when prompted, to get the fonts and do CSS. Resolves #270 and also resolves #288 (by proxy)
Caveats/notes: