https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
g

Guilherme Delgado

06/18/2021, 4:31 PM
Hi guys, have you noticed an increase of .apk size? A simple app with 4 screens (UI in compose) exports an .apk with size of ~45mb while iOS 4mb. Have the table been turned? 😛
l

louiscad

06/18/2021, 9:33 PM
It's something else, unrelated to Compose, Multiplatform or even Kotlin. You can use the apk analyzer in Android Studio (or just drag n drop the apk into the editor) to see what's taking up space.
👍 1
g

Guilherme Delgado

06/18/2021, 10:48 PM
nailed it, thanks for the suggestion. I never thought google fonts were the one to blame.
l

louiscad

06/18/2021, 11:04 PM
Is it? There's something called downloadable fonts that allow your app to share fonts with other apps and not have them bundled on a fresh install to avoid slow download. That said, I personally don't customize the font as much as possible since defaults are fine: leads to smaller app, less chance of mid-download failure or give up.
👍 1
g

Guilherme Delgado

06/19/2021, 7:28 PM
I believe its related to the fact that’s an otf and not a ttf font
🤔
l

louiscad

06/19/2021, 7:29 PM
Nope, it's just that Noto supports every possible character, not just Latin: Chinese, Japanese, Korean, Arabic, Cyrillic…
That's why it's so important to use downloadable fonts.
g

Guilherme Delgado

06/19/2021, 7:30 PM
ok. I’ll try it, thanks 🙂
l

louiscad

06/19/2021, 7:31 PM
Just search for "Android downloadable fonts". This font is pretty common, other apps might need it, so better to share it, as is possible 🙂
👍 1
10 Views