catimg icon indicating copy to clipboard operation
catimg copied to clipboard

Add support for fonts with different aspect ratio

Open qm3ster opened this issue 3 years ago • 2 comments

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

qm3ster avatar Oct 20 '21 19:10 qm3ster

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

posva avatar Oct 21 '21 15:10 posva

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.

qm3ster avatar Oct 26 '21 10:10 qm3ster