Jump to content

about Arabic translation


Recommended Posts

A decent solution will take a long time to implement. There were some experiments with pre-processing the files to change the order of the characters. But even when that's a done, the current text rendering code lacks kerning, and I heard that is quite important for Arabic.

Implementing kerning in the current text renderer will be too hard, and it would be better if we'd switch to standard text rendering engines (Pango and related). But that is also a lot of work.

So unless someone suddenly drops by and starts working on this, it can't be expected anytime soon.

Edited by leper
s/Tanto/Pango/
  • Like 2
Link to comment
Share on other sites

How far along are you with reordering the characters in the code? Reordering the characters is easy, the ligatures are what makes it complicated. The harfbuzz library would probably be the smartest way to go. We ship our own at Widelands, feel free to take -  it's GPL v2+.

How do you do your font rendering? SDL_ttf can handle the kerning just fine.
 

Spoiler

As you can see, mixing Arabic with Latin still has some vertical alignment issues in Widelands, but the kerning looks fine to me.arabic.png.6bb11490b310f4b4ccb335c97504b104.png

I'd be interested in helping, but it might be a few months until I find the time - I have my fingers in too many pies.
 

Edited by GunChleoc
Link to comment
Share on other sites

At the moment the text in the game is basically an image (the engine takes a font file and generates a bitmap with all the letters/numbers, I don't know how complex things it can do when generating it/reading from it, but I do know that limits things quite a bit :P), so it's probably best as Sander says to remove our current and integrate an existing rendering engine.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...