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 option to interpret size option as icon height rather than font size #65

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

pepijnve
Copy link
Contributor

@pepijnve pepijnve commented Dec 1, 2024

@jessedoyle here's a first attempt at the change we were discussing in #62.

Copy link
Owner

@jessedoyle jessedoyle left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution @pepijnve!

I took a bit of a deep dive and came to the same conclusion as you did. Ultimately the font metrics in the v6 files result in different rendering behaviour when compared to v5 (in particular due to more dramatic max ascender/descender values).

Added a couple of suggestions in the review, but I think the solution here is rather elegant. We'll need to add test coverage of the new option, but I'm on board with the change 👍

lib/prawn/icon/interface.rb Outdated Show resolved Hide resolved
lib/prawn/icon/interface.rb Outdated Show resolved Hide resolved
@pepijnve pepijnve force-pushed the icon_size branch 3 times, most recently from b89866d to f789a22 Compare December 5, 2024 15:50
@pepijnve
Copy link
Contributor Author

pepijnve commented Dec 5, 2024

@jessedoyle what's still missing is documentation. I'm not all that familiar with Ruby documentation conventions so I wasn't sure what the most appropriate place would be to add something. Currently the options hash isn't really documented; it just refers to Prawn's text options.

@jessedoyle
Copy link
Owner

Hey @pepijnve - thanks for the patience on this (I was away for a few days). With respect to the documentation, I have some housekeeping changes for the next release coming in the future and can add some basic docs at that time.

I plan on merging this work shortly and will cut a release including it in the near future.

Copy link
Owner

@jessedoyle jessedoyle left a comment

Choose a reason for hiding this comment

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

Thanks again!

@jessedoyle jessedoyle marked this pull request as ready for review December 11, 2024 01:28
@jessedoyle jessedoyle merged commit 37c64e7 into jessedoyle:master Dec 13, 2024
4 checks passed
@jessedoyle
Copy link
Owner

This change has been included in the 4.1.0 version release - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants