catimg
catimg copied to clipboard
Add support for fonts with different aspect ratio
The PR introduces -a
argument that allows pre-scaling the image for non 2:1 fonts.
fixes #64
Interface may be worth bikeshedding, perhaps biasing it to be around 100 and not 1.0 would be useful so integer arguments can be used meaningfully.
What kind of change does this PR introduce? (check at least one)
- [ ] Bugfix
- [x] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:
Does this PR introduce a breaking change? (check one)
- [ ] Yes
- [x] No
Thanks for the PR! I'm quite reluctant about such flag because it's not something intuitive and I don't know how people will guess the aspect ratio of their font. I also don't think people will want to pass an option everytime they use catimg
I considered (also) making it an env var, and starting on the path to some standard variable that signifies terminal font aspect, but for the time being people can just alias.
So instead of alias ci="catimg -H50"
they'd just do alias ci="catimg -H50 -a1.25"
in their dotfiles and be merrily on their way.