aMarCruz / react-native-text-size

Measure text accurately before laying it out and get font information from your App.
BSD 2-Clause "Simplified" License
405 stars 95 forks source link

Add numberOfLines, lineHeight options; create flatSizes; increase accuracy #37

Open hsource opened 2 years ago

hsource commented 2 years ago

Motivation

We have some Text components that

We want to measure their height using flatHeights.

This also increases accuracy for both iOS and Android by fixing tiny discrepancies.

Fix

Testing

Created Storybook story in our app to test it on both Android and iOS:

iOS Android
image image