Skip to content

Intro SkikoFont abstraction for async font loading on all Skiko platforms#2787

Open
adamglin0 wants to merge 11 commits intoJetBrains:jb-mainfrom
adamglin0:support-skiko-async-font-load
Open

Intro SkikoFont abstraction for async font loading on all Skiko platforms#2787
adamglin0 wants to merge 11 commits intoJetBrains:jb-mainfrom
adamglin0:support-skiko-async-font-load

Conversation

@adamglin0
Copy link

@adamglin0 adamglin0 commented Feb 24, 2026

Previously, Skiko-based platforms lacked a public API for async font loading. While PlatformFont serves as the low-level font representation, it is not designed for extensibility by developers. By introducing SkikoFont, we provide a mechanism similar to AndroidFont on Android, allowing developers to:

  • Load fonts asynchronously from remote sources (e.g., CDN, network)
  • Implement custom font loading strategies
  • Display fallback fonts during loading, with automatic text reflow when fonts arrive

Fixes CMP-8231 Async font loading support for iOS targets

Testing

This should be tested by QA, but because the SkiaParagraphIntrinsics-related items lack a listener for TypefaceResult.Async, you need to resize the window so that the text can reflow and display correctly.
(If #2789 is merged, it will automatically display after loading, with no further action required.)

Release Notes

Features - Multiple Platforms

  • Added a new SkikoFont abstract class to enable developers to implement asynchronously loaded fonts.

@adamglin0 adamglin0 marked this pull request as ready for review February 24, 2026 14:06
@adamglin0
Copy link
Author

adamglin0 commented Feb 24, 2026

@MatkovIvan @igordmn @eymar Could you assign reviewers for thsi PR, thanks.

Additionally, SkiaParagraphIntrinsics currently lacks support for tracking asynchronous font resolution, so it can’t update once the fonts are ready. I plan to address this in a separate PR. We can now force a recompose by resizing the window, either programmatically or manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant