React本机字体大小不匹配Figma模拟
我有一个为iPhone 11 Pro设计的Figma模拟,WXH为375x812像素。即使在同一iPhone模型上运行React Native时,我也无法使用React Native的样式属性来匹配FIGMA字体大小。例如,如果我在FIGMA A fontsize
中使用14中的14px的字体大小,则在React Native中的14个大小与之匹配。没有明显的缩放因子匹配的因素(例如3倍尺度因子太大)。
如何从FIGMA字体尺寸到React本机字体大小?
编辑:在同一设备上运行的我的应用程序和无花果的屏幕截图表明,在应用程序中, All UI元素(包括文本)比无花果小〜10%。
I have a Figma mock that's designed for iPhone 11 Pro and a WxH of 375x812 pixels. I can't match the Figma font size using React Native's fontSize
style property, even when running React Native on the same iPhone model. For example, if I use a font size of 14px in Figma a fontSize
of 14 in React Native doesn't match that. There's no obvious scaling factor that matches either (e.g. a 3x scale factor is way too large).
How do I go from a Figma font size to a React Native font size?
Edit: taking a screenshot of my app and Figma, running on the same device, shows that all UI elements (including text) are ~10% smaller in the app than in Figma.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Fontscale将根据您的设备获得比例。
fontScale will get scale as per your device.