Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Display Arabic Characters correctly. — Gideros Forum

Display Arabic Characters correctly.

AlaaAlaa Member
edited May 2023 in General questions
In Solar2D, when creating a text, the font is specified as native.systemFont, and when testing the project on Android, the Arabic characters appear correctly, so why is it not the case with Gideros ? Is there a solution for that?
note: In Gideros, I used TTFont, to create the text, in windows player Arabic Characters appear correctly, but in Android appear separated.
Ex: مرحبا ----> م ر ح ب ا


  • MoKaLuxMoKaLux Member
    you need to include harfbuzz in your project (right click Plugins - Harfbuzz) :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited May 2023 Accepted Answer
    a quick example:
    	local myfont = TTFont.new("fonts/trado.ttf", 90) -- my arabic ttf + size
    	local mytext = TextField.new(myfont, "سلم") -- may display weird in gideros studio
    	mytext:setPosition(256, 256)
    note: works on android >= 5

    PS: if you are using wifi within gideros studio to quickly test your app, you may install this apk on your phone https://github.com/mokalux/gideros-player-for-android (it includes harfbuzz)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • AlaaAlaa Member
    Thanks a lot, it worked when I added the HarfBuzz plugin, and installed the new Gideros player on my android device.

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.