-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[frameit] add font_size parameter #16870
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition, although a bit scary. Sure this will not change existing behavior?
The code now checks (see below), if a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small safety check!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Thank you so much for adding this and responding to my review! Really appreciate the contribute ❤️
Hey @ChaosCoder 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations! 🎉 This was released as part of fastlane 2.153.0 🚀
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
frameit scales the
keyword
andtitle
automatically per screenshot to fit the available size above or below the device. This is a good approach for simple screenshots, but lacks a consistent and unified appearance across the screenshots.Specifying a fixed
font_size
for keyword and title (separately) gives users of frameit the ability to fix the font size and keep it consistent across screenshots.Description
This PR introdocudes a new parameter
font_size
for thekeyword
andtitle
parameters. Instead of calculating theactual_font_size
from the available space everywhere, it now checks for thefont_size
and returns it if specified andfont_size > 0
. This way, we keep the old behavior intact.Testing Steps
Specifiy a
font_size
in either thedefault
config in yourFramefile.json
or for a single screenshot config for thetitle
orkeyword
. Frameit should use this font size when generating the framed screenshots.