Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
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
Screen Shot 2019-12-17 at 09.13.09.png
239 x 156 - 7K
Screen Shot 2019-12-17 at 09.17.37.png
230 x 233 - 10K

Comments

Sign In or Register to comment.