You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library looks very promising to me, it has a lot of options and seems to be even quite fast!
However, I wonder why line-height is not supported yet as an option for the flatHeights function? 🤔
We use the line-height style prop every now and then and it's a common typography setting as well.
The text was updated successfully, but these errors were encountered:
We found that this library seems to use the fontSize as the lineHeight for its calculation. So when the lineHeight is different from the fontSize, the calculated height indeed isn't correct anymore. We implemented a little hack around this, which requires the measure() method to be used though instead of the flatHeights() method (since it requires the lineCount property):
So we subtract the font size from the line height in order to get the excess line height, multiply that with the calculated amount of lines and add the result of that to the height calculated by the library. Works great for us.
This library looks very promising to me, it has a lot of options and seems to be even quite fast!
However, I wonder why
line-height
is not supported yet as an option for theflatHeights
function? 🤔We use the line-height style prop every now and then and it's a common typography setting as well.
The text was updated successfully, but these errors were encountered: