JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.24k stars 1.11k forks source link

[WASM] - Custom Fonts loading time #4968

Open GuilhE opened 1 week ago

GuilhE commented 1 week ago

Describe the bug Depending on the platform we're running the wasm app, it is noticeable the loading time of custom fonts.

Affected platforms

Versions

To Reproduce Steps to reproduce the behavior:

  1. Open https://guilhe.github.io/WhosNext/ on devices that are compatible with WASM
  2. Play with it

Expected behavior Unnoticeable fonts loading time

Screenshots Faster: OSX 14.5 (23F79) | Firefox 126.0.1:

https://github.com/JetBrains/compose-multiplatform/assets/2677139/6ad78f71-01eb-4ad6-8473-36a44c18ba28

Slow: Google Pixel 3a (971AYOZ223) Android 12 API 32 | Chrome 125.0.6422.113:

https://github.com/JetBrains/compose-multiplatform/assets/2677139/26c0647f-f0c8-47a8-9b6a-9de374ab328b

Slowest: Allwinner T8100 (T8100C045298) Android 10 API 29 | Chrome 126.0.6478.71:

https://github.com/JetBrains/compose-multiplatform/assets/2677139/968e8d35-35ba-4da0-bbe6-a34af97293b3