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

Add new fonts #39477

Merged
merged 4 commits into from Apr 26, 2018
Merged

Add new fonts #39477

merged 4 commits into from Apr 26, 2018

Conversation

ChengCat
Copy link
Contributor

Motivation for this change

Add 2 new fonts by @be5invis

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All my comments on Sarasa Gothic also apply to Inziu Iosevka

@@ -0,0 +1,32 @@
{stdenv, fetchurl, p7zip}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Spaces before stdenv and after p7zip is the convention.

Copy link
Contributor Author

@ChengCat ChengCat Apr 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out these improvements, I'll do an update.

@@ -0,0 +1,32 @@
{stdenv, fetchurl, p7zip}:

stdenv.mkDerivation (rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ( around here isn't needed.


unpackPhase = ''
7z x $package
'';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of fetching the already prebuilt release, can you try to make the build with Nix instead?

Copy link
Contributor Author

@ChengCat ChengCat Apr 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, that seems more involved, and I currently don't have time for that. I may look into this later.

Copy link
Member

@Mic92 Mic92 Apr 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the advantage of building fonts from source?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it doesn't depend on sombody making the releases available. The source can be freely changed to a different one. E.g. In case the orginal one gets deleted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sources can be vanished as well, but the tarball url here looks indeed strange.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking of git clones, if anybody forks/clones the repo the sources aren't lost.

cp *.ttf $out/share/fonts/truetype
'';

phases = [ "unpackPhase" "installPhase" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting phases directly is very discouraged, should work without it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give a hint which is the preferred way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I got it. I'll do another update.


phases = [ "unpackPhase" "installPhase" ];

meta = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid having to prefix stdenv.lib to the lines below, you can use meta = with stdenv.lib; { here instead.


meta = {
description = "Inziu Iosevka font";
homepage = https://be5invis.github.io/Iosevka/inziu;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it makes sense to package a deprecated font which has been superseded by the Sarasa Gothic one, other than for historical record. Is there any reason anybody would want to use this one instead of Sarasa Gothic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am having issues with Sarasa Gothic. While Inziu Iosevka is deprecated by the author, it seems more stable.

@Mic92
Copy link
Member

Mic92 commented Apr 26, 2018

Both fonts were really large so I disabled hydra builds. This should not affect the user experience since it does not make it a big difference if the original archive is unpacked or our one.

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

4 participants