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

fontpreview: init at 1.0.6 #93535

Merged
merged 1 commit into from Jul 20, 2020
Merged

Conversation

erictapen
Copy link
Member

Motivation for this change

Add fontpreview package, was also sorta requested in #93108.

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.

@davidak
Copy link
Member

davidak commented Jul 20, 2020

Thanks. I thought about packaging it, because it's relatively easy and we have a package more to beat AUR some day, but that is a poor reason and we have enough font preview programs.

This might be nice for people that always use the console and use window managers. It's also somewhat popular. But no one has requested it. So i decided to work on something else.

Copy link
Member

@davidak davidak left a comment

Choose a reason for hiding this comment

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

LGTM

works

Screenshot from 2020-07-20 16-45-47


stdenv.mkDerivation rec {
pname = "fontpreview";
version = "1.0.6";

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, I also noticed that. To me that means the author didn't intend to release the new version yet, but only wanted to prepare the new release.

Copy link
Member

Choose a reason for hiding this comment

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

that's possible

@davidak
Copy link
Member

davidak commented Jul 20, 2020

--preview-text don't work

help says:

--preview-text preview text that should be displayed in the font preview window

so does it only work in window mode and not in file creation mode? idk

works

fontpreview -o input.png -i ~/.nix-profile/share/fonts/truetype/FiraCode-Bold.ttf

same result

fontpreview -o input.png -i ~/.nix-profile/share/fonts/truetype/FiraCode-Bold.ttf --preview-text "The quick brown fox jumps over the lazy dog."

still default text

fontpreview --preview-text "The quick brown fox jumps over the lazy dog."

even an error

[nix-shell:~/.cache/nixpkgs-review/pr-93535]$ fontpreview -i ~/.nix-profile/share/fonts/truetype/FiraCode-Bold.ttf --preview-text "The quick brown fox jumps over the lazy dog."
convert: unable to open image `/home/davidak/.nix-profile/share/fonts/truetype/FiraCode-Bold.ttf.png': Read-only file system @ error/blob.c/OpenBlob/2881.
convert: WriteBlob Failed `/home/davidak/.nix-profile/share/fonts/truetype/FiraCode-Bold.ttf.png' @ error/png.c/MagickPNGErrorHandler/1642

might be all upstream issues

Update: yes, known issue sdushantha/fontpreview#41

@davidak
Copy link
Member

davidak commented Jul 20, 2020

@GrahamcOfBorg build fontpreview

Copy link
Contributor

@danieldk danieldk left a comment

Choose a reason for hiding this comment

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

There is an implicit dependency on getopt (thus util-linux):

$ wrapit `realpath results/fontpreview/bin/fontpreview`
/nix/store/xkr30dknc388z82r5zi9fyyas0386v1b-fontpreview-1.0.6/bin/.fontpreview-wrapped: line 167: getopt: command not found

@erictapen
Copy link
Member Author

There is an implicit dependency on getopt (thus util-linux):

$ wrapit `realpath results/fontpreview/bin/fontpreview`
/nix/store/xkr30dknc388z82r5zi9fyyas0386v1b-fontpreview-1.0.6/bin/.fontpreview-wrapped: line 167: getopt: command not found

Thanks, I introduced the getopt package as a dependency.

@danieldk danieldk merged commit 4105f13 into NixOS:master Jul 20, 2020
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

3 participants