Fix TextBox line height type#34
Fix TextBox line height type#34simonhamp merged 2 commits intosimonhamp:mainfrom nicoverbruggen:main
Conversation
\Intervention\Image\Typography\FontFactory lets you call `lineHeight` with a float for more line height options. Currently, the package only lets you provide a custom line height as an int. Since the default value is 1.6, this fix lets you set it to e.g. 1.8, which may be better if you are using a custom font or want to have more granular control over the layout that is being rendered.
|
@nicoverbruggen looks like this changes some images generated during the tests and now they don't match the snapshots. Could you update the snapshots and commit them? |
|
@simonhamp Shouldn't all of the checks for all of the PHP versions fail if that's the case? If I run the tests locally everything passes on my end! (Edit: Since I'm running this on PHP 8.4 I've also added that version to the test matrix.) |
|
You're right. I just looked at those failures and can see it's something else... not sure what |
simonhamp
left a comment
There was a problem hiding this comment.
Well, they all passed this time 🤷🏼
|
@simonhamp This is the same snapshot that fails for #33 For whatever reason the snapshot uses a variant of the |
\Intervention\Image\Typography\FontFactorylets you calllineHeightwith a float for more line height flexibility. Currently, the package only lets you provide a custom line height as an int. Since the default value is 1.6, this seems like an oversight.This fix lets you set it to e.g.
1.8, which may be better if you are using a custom font or want to have more granular control over the layout that is being rendered, which is my own use case.(Unsure why one of the tests fails, by the way. Runs fine locally, but guessing it's because you're doing some HTTP requests that may not work correctly on one of the runners here?)