Any guidance on what `.sp` means in Storyboard? I ...
# storyboard
j
Any guidance on what
.sp
means in Storyboard? I want my presentation layouts to be less dynamic than software, and so I really don’t want to think about running my presentation on a different device and having the text size different.
b
I'm actually not sure. I believe this is based on the local density? It seems that changing the
fontScale
of the local density scales the font proportionally. And it seems that
lineHeight
is what controls the height of the text which is
.sp
* density. But I don't know how this translates to the configuration options in something like Keynote.
j
I think I’ll try to find a Compose way to fix it at 1.0
b
I believe the default I've seen is density=2 and fontScale=1. It's the same on desktop and web for me.
1
As part of setting a fixed storyboard size, we could also set a default density as well? This is the composable which automatically scales the presentation, in case that's interesting: https://github.com/bnorm/storyboard/blob/main/storyboard-easel/src/commonMain/kotlin/dev/bnorm/storyboard/easel/internal/FixedSize.kt