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

nerdfonts: disable Windows font variants (by default) #93051

Merged
merged 1 commit into from Jul 15, 2020

Conversation

samuelgrf
Copy link
Member

@samuelgrf samuelgrf commented Jul 13, 2020

Motivation for this change

The only difference between these and the regular fonts is that the internal font name is limited to 31 characters. There's no reason to have these on *Nix systems.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
    Before: 4113944904 (3.8G)
    After: 2057293344 (1.9G)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 14, 2020

Well, technically one could install and use Nix on windows. So, unless there is a large decrease in closure size I wouldn't just remove it. Maybe put it behind a guard like enableWindowsFonts.

@samuelgrf
Copy link
Member Author

samuelgrf commented Jul 14, 2020

I am pretty sure this decreases the closure size considerably.
The Noto archive from the releases page is ~900 MB in size, since there are 3 variants of every font file (Normal, Mono and Windows), we can expect the closure size to shrink by 33%, by 300MB; and this would be without any other fonts. I'll test this when I get home.

Putting this behind a guard makes sense, I forgot about Nix on Windows.

@samuelgrf
Copy link
Member Author

samuelgrf commented Jul 14, 2020

I was incorrect. I ran nix path-info -S and the closure size is actually halved.
Before: 4113944904 (3.8G)
After: 2057293344 (1.9G)

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 14, 2020

Wow, I had no idea it was that large: it certainly make sense to disable, but still it should be configurable.

The only difference between these and the regular fonts is that
the internal font name is limited to 31 characters. They double
the package closure size.
@samuelgrf samuelgrf changed the title nerdfonts: remove windows compatible versions of fonts nerdfonts: disable Windows font variants (by default) Jul 14, 2020
@rnhmjoj rnhmjoj merged commit d8ec219 into NixOS:master Jul 15, 2020
@samuelgrf samuelgrf deleted the fix/nerdfonts-no-winfonts branch March 5, 2022 09:32
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

2 participants