icerockdev / moko-widgets

Multiplatform UI DSL with screen management in common code for mobile (android & ios) Kotlin Multiplatform development
https://moko.icerock.dev
Apache License 2.0
387 stars 32 forks source link

[WIP] Custom fonts support in TextStyle fixes #6 #262

Open kkalisz opened 4 years ago

kkalisz commented 4 years ago

Hi,

this is draft of support for custom fonts in TextStyle. My main concern now is about how to ( or even should we ) support custom font with and fontStyle at the same time. Basically we can include different types of fonts with only one text style, or with multiple font styles. I think that currently there is no even easy way to do it on any of the platforms. We can use typeface on android and symbolicTraits on iOS and add some fallbacks to default font. But personally it think that (at least for now) we should skip fontStyle when custom font is set. Main reasons for that:

What do you think ?

I will continue my work, when there will be decision which path should we follow.