Skip to content
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

sarasa-gothic: rewrite: TTC and fixed-output #50974

Merged
merged 1 commit into from
Nov 24, 2018
Merged

sarasa-gothic: rewrite: TTC and fixed-output #50974

merged 1 commit into from
Nov 24, 2018

Conversation

dramforever
Copy link
Contributor

Rewritten to use TTC archive instead of the TTF one. It's also now fixed-output.

Motivation for this change

The current sarasa-gothic font takes up 2.2GB in the Nix store. This can be reduced to 212MB by using the TTC archive instead of the TTF one, which shares data between individual fonts and has a much smaller size than the sum of individual fonts.

It was written like wqy_zenhei. It, as it has been, does not use fetchzip because p7zip is needed.

Also I've made it fixed-output like wqy_zenhei. This should avoid unnecessary re-builds.

I have not kept hydraPlatforms = [] due to the size having drastically decreased. Is this acceptable? (cc @Mic92)

nix path-info -S output showing the improvement:

/nix/store/i7sjfwhxxlp197063avdyhqql7pydyrl-sarasa-gothic-0.6.0  2288735488         # 2.2GB
/nix/store/z2x9q54rdyjicpf61yg0nn2wap9vr0fv-sarasa-gothic-0.6.0   212067152         # 212MB
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

Rewritten to use TTC archive instead of the TTF one, which drastically
shrinks the closure size. (2.2G to 212M on v0.6.0.) It's also now
fixed-output.
@dramforever
Copy link
Contributor Author

Uhh, the diff is a whole mess. It's probably better to just read the whole file.

@c0bw3b c0bw3b added 8.has: package (update) This PR updates a package to a newer version and removed 8.has: package (new) This PR adds a new package labels Nov 24, 2018
@Mic92 Mic92 merged commit 9842853 into NixOS:master Nov 24, 2018
@Mic92
Copy link
Member

Mic92 commented Nov 24, 2018

Thanks!

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 24, 2018

Hello and thanks for the contribution. Reducing closure size by a factor 10 and making it fixed-output is certainly welcomed.

To me removing hydraPlatforms = []; is fine. Other fonts don't use it.

Note: it seems a v0.7 has been released 2 days ago. Your PR could also update the font at the same time.

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 24, 2018

( woops been writing while it was merged :p )
Nevermind, can be done in another PR

@dramforever
Copy link
Contributor Author

dramforever commented Nov 24, 2018

As the maintainer of sarasa-gothic, @ChengCat you might want to know that I just did this...

@Janik-Haag Janik-Haag added the 12. first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants