persian language (unicode) support by last version 1.8.4

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
mamadreflex
Posts: 2
Joined: Fri Sep 16, 2016 6:32 am

persian language (unicode) support by last version 1.8.4

Post 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 ?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

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

Post 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.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mamadreflex
Posts: 2
Joined: Fri Sep 16, 2016 6:32 am

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

Post 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 .
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

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

Post by CuteAlien »

Hm, we can't do that connected font thing.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

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

Post 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.
"this is not the bottleneck you are looking for"
Post Reply