I'm currently implementing tons of conditions in the rendering of my components because it seems that there is hudge differences of font size between the devices.
It is not clear for from now what are the different factors. On smaller Android devices, I get smaller fonts than on larger iOS devices, resulting into words strangely cutted on iOS. For instance...
I browsed the web and found several tips:
- Creating a utility custom hook that return a function that can scale according to screen width. But it appears that this create a lot of issues since useWindowsDimensions does not update correctly after screen rotation on React 0.63 on Android.
- Some people scale according to the pixel density, using PixelRatio, suggesting that screens that have a pixel ration >= 2 are bigger. Seems to be very approximative, is it ???
- Font scale is also clearly an issue. My bet is that I need to reset it on large titles or these will become enormous.
Is there a simple and universal approach to adapt to the different screens, using React Native Paper? Or maybe some important tips I can make use of?
Thanks