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.

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.

@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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants