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

source-han-{sans,serif,mono}: {update,refactor,init} #79776

Merged
merged 1 commit into from Feb 29, 2020

Conversation

@emilazy
Copy link
Member

@emilazy emilazy commented Feb 10, 2020

Motivation for this change

The Source Han fonts now use shared package infrastructure, and the Super OTC distributions, which unify the various scripts into a single bundle file, improving automatic font selection and reducing overall disk space usage. This also means that the Traditional Chinese—Hong Kong language variant is now included.

The old package names including language are aliased to the Super OTC bundle packages.

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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@emilazy
Copy link
Member Author

@emilazy emilazy commented Feb 10, 2020

@GrahamcOfBorg build source-han-sans source-han-serif source-han-mono

@taku0
Copy link
Contributor

@taku0 taku0 commented Feb 11, 2020

The official README recommends language specific OTFs for Linux. Actually, I experienced that some applications (sorry, I forgot which one was) fail to select proper language. I will try this branch.

@emilazy
Copy link
Member Author

@emilazy emilazy commented Feb 11, 2020

I don't see any specific recommendation for Linux in that document (but maybe I'm missing it?), just notes that lots of font engines don't handle the Super OTCs well – I think that's probably out of date, since I've had no problems with it in my testing so far, and if anything the results for multilingual content are better. Custom fontconfig does potentially need adjusting to use the generic Source Han … aliases without the language code, though. This upstream issue for Noto CJK (which is almost identical to Source Han) suggests that Super OTCs would be recommended for Linux if there were any concrete recommendations.

@taku0
Copy link
Contributor

@taku0 taku0 commented Feb 11, 2020

I mean “Other” in the flowchart. Anyway, I will try this branch with Firefox, Inkscape, LibreOffice, KDE, and GNOME desktop in a clean virtual machine.

@taku0
taku0 approved these changes Feb 11, 2020
Copy link
Contributor

@taku0 taku0 left a comment

It works fine, at least for Japanese locale. Size of the files could be a problem, but IMO it is acceptable.

@emilazy emilazy force-pushed the emilazy:update-source-han-fonts branch from 17df3b2 to e8828d4 Feb 11, 2020
@emilazy
Copy link
Member Author

@emilazy emilazy commented Feb 11, 2020

Updated to use stdenvNoCC to cut down on extraneous rebuilds.

@GrahamcOfBorg build source-han-sans source-han-serif source-han-mono

@ofborg ofborg bot requested a review from taku0 Feb 11, 2020
@taku0
taku0 approved these changes Feb 15, 2020
Copy link
Contributor

@taku0 taku0 left a comment

LGTM

@yegortimoshenko yegortimoshenko force-pushed the emilazy:update-source-han-fonts branch from e8828d4 to 0715ba3 Feb 29, 2020
* source-han-sans: 1.004R -> 2.001
* source-han-serif: switch to Super OTC
* source-han-mono: init at 1.002

The Source Han fonts now use shared package infrastructure, and the
Super OTC distributions, which unify the various scripts into a single
bundle file, improving automatic font selection and reducing overall
disk space usage. This also means that the Traditional
Chinese—Hong Kong language variant is now included.

The old package names including language are aliased to the Super OTC
bundle packages.
@yegortimoshenko yegortimoshenko force-pushed the emilazy:update-source-han-fonts branch from 0715ba3 to 6eb45bf Feb 29, 2020
@ofborg ofborg bot requested a review from taku0 Feb 29, 2020
@yegortimoshenko yegortimoshenko merged commit 6602e9a into NixOS:master Feb 29, 2020
13 checks passed
13 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@taku0
taku0 approved these changes Feb 29, 2020
Copy link
Contributor

@taku0 taku0 left a comment

OK. Only the context of the diffs are changed.
0715ba3
6eb45bf

@emilazy emilazy deleted the emilazy:update-source-han-fonts branch Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.