为什么源字母间距与Android材质设计中的文档不同?

问题描述 投票:0回答:1

我对android:letterSpacing属性感到困惑。这里https://material.io/design/typography/the-type-system.html#type-scale表示Body1的字母间距为0.25px,但在源代码中显示为0.0178571429

enter image description here

如果我需要字母间距0.25像素(或0.15像素或任何其他像素),我应该使用什么值(或如何计算正确的值?)?<item name="android:letterSpacing">0.0178571429</item>要么<item name="android:letterSpacing">0.25</item>

android material-design typography android-fonts android-typeface
1个回答
0
投票
我在How to calculate letterSpacing for TextView from sketch values?找到了答案。如果仅将0.25 / 14除以0.0178571429,我们将获得letterSpacing属性值
© www.soinside.com 2019 - 2024. All rights reserved.