CMP question: if you have a font in `commonResourc...
# compose
k
CMP question: if you have a font in
commonResources
, can you create a font for iOS using
UIFont.fontWithName("MyFont)
in
iosMain
? Or will that not work because it can't reference the font. Also I am trying to reference it from an SPM package
k
No. It won't work. Because there's no such thing as a font for iOS in the compose resources. You could try a raw font file and get a path via Res.getUri https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-resources-usage.html#raw-files
👍 1
Answer next question: it is not possible to get an Uri for Res.font.someFont, because it might be different files depending on the environment
👍 1
k
Thanks! That's what I was guessing but I wasn't sure, thanks for explaining it in more detail!