Hello on my 1st try on kotlin wasm i found it don'...
# webassembly
b
Hello on my 1st try on kotlin wasm i found it don't support Arabic text its show ??????? Are any one help my on fix it
a
When you say, "Kotlin/Wasm doesn't support Arabic text," do you mean that an Arabic font isn't rendered in Compose for Web?
b
Example Text("مرحبا hello") The result on jvm مرحبا hello On mobile مرحبا hello On kotlin/wasm ????? Hello
a
Could you please describe the steps to reproduce it?
b
https://kotlinlang.org/docs/wasm-get-started.html#before-you-start as this link and open it on Android Studio after that add Text("Hello مرحبا") on compose code run project WASM its work but Arabic laters show as "?????" eglish show ok| try it on TextField. It's the same value be ???? when I type Arabic try that again on Andriod, and JVM that works ok try that on other PCs and on Windows and LUNIX OS. The same result uploaded to a real website same Arabic be ??????
b
same for kanji, hiragana and katakana ひらがな - カタカナ - 漢字 characters are replaced by '▯' @Bahaa Qurini does it work if you change the font ?
c
It might be that wasm isn't able to find the font, correclty, does it work if you compile as a js target?
d
You are not alone. Many of us have reported issues with ‘▯’ AKA tofu. There are some tickets opened in YouTrack and hopefully getting looked at soon.
👋 1
a
@Oleksandr Karpovich [JB] could you please share a relevant YouTrack ticket of this problem?
o
hey everyone! Compose for Web has only one built-in font out of a box, which doesn't cover many languages (otherwise the binary would be too big). But it's possible to provide a fallback font (or even more than one). There is an example in the description here: https://github.com/JetBrains/compose-multiplatform-core/pull/1400 It requires downloading a font. (The fallback font should work in Compose for Web starting with 1.7.0-alpha02 or the dev builds). If you prefer to not download a font, you might give Local Font Access API a try: https://developer.mozilla.org/en-US/docs/Web/API/Local_Font_Access_API (it's experimental and available only in Chrome for now)
🥳 3
❤️ 1
a
@Oleksandr Karpovich [JB] do we have any documentation/tutorial for it?
o
not yet, since it's a dev/alpha stage for now.
🫡 1