Page 1 of 1

persian language (unicode) support by last version 1.8.4

Posted: Fri Sep 16, 2016 6:42 am
by mamadreflex
i want create a fully unicode game with this engine. (persian is like arabic)
but at start when i use setWindowCaption with persian text (تست) i got title with some thing like this (?????)

question : can i use this engine with my language and use unicode in all of game ?

Re: persian language (unicode) support by last version 1.8.4

Posted: Fri Sep 16, 2016 10:34 am
by CuteAlien
I'm not sure really. There is some right-to-left writing support in some gui-elements I think (is it needed for persianl?).
First you need a font which supports persian. Irrlicht comes with a font-tool to create new bitmap fonts. You can try to make one with that tool.
Otherwise you can also try to use a truetype font wrapper (I have one for freetype on https://bitbucket.org/mzeilfelder/irr-p ... -micha/src - the CGUITTFont files + the ttf.cpp as example, but check it out again in a few days, I've updated that code a lot over last 2 weeks, but haven't checked in yet - will do that on weekend).
Once you have a font - just experiment. If it doesn't work give me the font (and some persian example texts) and I'll experiment.

Re: persian language (unicode) support by last version 1.8.4

Posted: Fri Sep 16, 2016 11:14 am
by mamadreflex
hello cutealien thanks for reply
I'm not sure really. There is some right-to-left writing support in some gui-elements I think (is it needed for persianl?).
yes persian/arabic like languages are right to left . bad thing here is character will change shape when u change their position in word.

for example : s in persian is "س" and see when u use double s (ss) : "سس" . as you see first one change its shape.i think they call it connected font or some thing

there is lots of font but one of famous one is tahoma and Times New Roman . see link below :
http://www.wazu.jp/gallery/Fonts_Persian3.html

for persian text sample see link below :
https://fa.wikipedia.org/wiki/%D8%A7%D9 ... 8%B3%DB%8C

btw let me first try it i will call you if i cannot use that .

Re: persian language (unicode) support by last version 1.8.4

Posted: Fri Sep 16, 2016 11:42 am
by CuteAlien
Hm, we can't do that connected font thing.

Re: persian language (unicode) support by last version 1.8.4

Posted: Sat Sep 17, 2016 5:00 am
by Cube_
I'd probably use a unicode supported text parsing library and cache text to bitmapped textures and render the text as 2D image primitives.
But that's probably not the best solution, just the first that came to mind that is compatible with irrlicht.