Installing Fonts from a GitHub Repository
There are some fonts that aren't on any of the 3 backends supported by fontget, like SF Pro or Iosevka.
Having a way to install fonts from GitHub as a backend would be very useful, whether it's downloading from the repo directly, or from releases.
For example:
fontget add "gh.sahibjotsaggu/San-Francisco-Pro-Fonts"
fontget add "gh-releases.be5invis/Iosevka"
hey @kk-spartans - Nice idea and thanks for the suggestion.
I’m probably not going to add a dedicated GitHub backend (gh.* / gh-releases.*) directly right now, but you can already do this today with a custom source.
I just added a step-by-step guide because of your question: docs/custom-sources.md
Basic idea:
- Create your own fonts.json source file
- Host it publicly (GitHub works great)
- Point font file URLs to files you host in your repo (or elsewhere)
- Add it in FontGet with sources add
Example:
fontget sources add --name "My GitHub Fonts" --url "https://raw.githubusercontent.com/<username>/<repo>/main/fonts.json" --prefix gh --priority 10
fontget add "gh.iosevka"
So yea a repo like this can be used as the file host in a custom source setup by linking the font files in your own source file: https://github.com/sahibjotsaggu/San-Francisco-Pro-Fonts
Hope this helps at least. Let me know how you go with it!
Thanks for the involvement, I'll try it out soon!