Xaml: -20 (multiply by 1000 and round to an int for CharacterSpacing)
Swift uses fixed pt values for letter spacing, but all other platforms use em/%, and we don't know the corresponding font size for any letter spacing token, so it isn't possible to convert the values. For now, though, we don't actually require being able to use the same letter spacing token on other platforms, so we can just conveniently ignore that problem for now. When we switch to the W3C format it won't matter because that format supports both px and rem values anyway (though it should really be em, not rem...).
JSON format value:
-0.02
-0.02rem
(addrem
)-2%
(multiply by 100 and add%
)-0.02em
(addem
forletter-spacing
)-20
(multiply by 1000 and round to an int forCharacterSpacing
)Swift uses fixed pt values for letter spacing, but all other platforms use em/%, and we don't know the corresponding font size for any letter spacing token, so it isn't possible to convert the values. For now, though, we don't actually require being able to use the same letter spacing token on other platforms, so we can just conveniently ignore that problem for now. When we switch to the W3C format it won't matter because that format supports both
px
andrem
values anyway (though it should really beem
, notrem
...).