nerd-fonts icon indicating copy to clipboard operation
nerd-fonts copied to clipboard

Extract the patched fonts into separate repository?

Open logarytm opened this issue 9 years ago • 8 comments

I should not have to clone/download +1GiB repository just to patch one non-free font. No, optical fiber cables aren't available in every location yet on this planet.

logarytm avatar Mar 23 '16 20:03 logarytm

Yeah I am sorry about that. :disappointed:

You are correct they really should be in a different/separate repo. :+1:

It is something that has come to my mind several times but I have yet to address the issue (mostly due to a backlog of other issues).

workaround: I know this isn't ideal but you can actually patch any font you want without downloading the entire repo. The only things you should need are font-patcher and the glyph-source-fonts folder.

No, optical fiber cables aren't available in every location yet on this planet.

Yeah, it is something I know we all need to think more about if we are lucky enough to have decent connections.

ryanoasis avatar Mar 23 '16 23:03 ryanoasis

Just to be clear I would probably only get around to this if there is enough interest to form a GitHub organization (see #67)

ryanoasis avatar Apr 29 '16 13:04 ryanoasis

This is going to be at least partially fixed in 1.0.0 release (the size issue is addressed)

ryanoasis avatar Dec 14 '16 03:12 ryanoasis

I am very tempted to close this but... I still think it is a valid concern/question.

This does depend on #67 though. I will not separate out the fonts from the patcher (and various dependencies) without converting this project to an organization :smile:

ryanoasis avatar Aug 04 '17 23:08 ryanoasis

It would be amazing if this landed!

perrin4869 avatar Jun 25 '20 14:06 perrin4869

I researched about getting specific subdirectories of a repository and I found out that GitHub supports 2.19 git version which has filter option and the commands below should only gets src and font-patcher. This answer explains how's that command works.

$ git --version
git version 2.31.1
git clone --depth 1 --filter=blob:none --sparse https://github.com/ryanoasis/nerd-fonts
cd nerd-fonts
git sparse-checkout set font-patcher src/

At the time I wrote this comment, if I clone whole repository (with --depth 1), the directory size was ~5.7GB. As a user who wants to just patch a font family, running the commands above gives me 467.5MB.

egeesin avatar Jul 22 '21 13:07 egeesin

git-filter-repo is the newish, easy, efficient, and recommended way to clean up a repository like this one. If you don't care about keeping a separate repo around (after all, the built fonts are included in GitHub's release artifacts), do the following.

cd copy-of-repo
git-filter-repo --force --invert-paths --path patched-fonts --path temp-generated-fonts-old --path 'Knack Regular Nerd Font.ttf'
#git push --force #push it over the other one upstream maybe?
  • whole folder 12.5 GiB => 748.3 MiB (or less)
  • .git directory 7.4 GiB => 247.6 MiB (or less)

You could further save space in the repo by doing this to src/unpatched-fonts/ (those could be replaced by symbolic links to their canonical repositories, though it would take a little restructuring to keep the config.cfg files).

earboxer avatar Jan 27 '22 01:01 earboxer

Unfortunately the new Gitlab workflow again stores all build artifacts INSIDE the repo. I am not really sure why. (Commit and push ... in picture below)

The workflow should just create artifacts. Who is interested can download them from the RC release page. If new actions run the old artifacts will be forgotten (except when they are proper releases).

image

I believe the workflow must be fixed first.

For the workflow to be fixed I would also propose to externalize the build process out of gitlab actions, some script, Makefile, Meson build definition, whatever, that does all the work. That can also be invoked locally by users and developers and create the same artifacts that Gitlab would create.

But then the repo filter is excellent! Good suggestion.

Finii avatar Jan 27 '22 07:01 Finii

I put this on the "future" milestone and close.

At the moment I can not work on that because of missing access rights, though.

Finii avatar Jan 30 '23 11:01 Finii

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

github-actions[bot] avatar Aug 14 '23 00:08 github-actions[bot]