Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
TextField RTL text coloring — Gideros Forum

TextField RTL text coloring

I am trying to create a TextField with a text in arabic. I want to color each letter differently.
I saw a response of @hgy29 that uses "\e[color=#..]".
I tried by passing an arabic text:

c1 = utf8.char(1602)
c2 = utf8.char(1604)
c3 = utf8.char(1605)
local tt = TextField.new(arabic_font, "\e[color=#f0f]"..c1.."\e[color=#f00]"..c2..c3)
--c1 is the red letter
tt:setPosition(100,100)
self:addChild(tt)

local tt2 = TextField.new(arabic_font, c1..c2..c3)

tt2:setPosition(100,130)
self:addChild(tt2)


It shows:


Thank you in advance

Likes: MoKaLux

+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.