Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: arabic not rendered correctly  (Read 5635 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: arabic not rendered correctly
« Reply #15 on: July 02, 2012, 02:10:10 pm »
Pango is a big library, which is based on Glib. I cannot be used by SFML.

HarfBuzz seems to be a much lighter dependency.
Laurent Gomila - SFML developer

mustafa

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: arabic not rendered correctly
« Reply #16 on: July 03, 2012, 03:11:32 am »
I've got it to work.. This time I changed the font to insure it support all the possible character set I've used
DejaVuSans.ttf

>> it comes with Ubuntu

it's hard coded unicode I've used the table as a reference
I believe by adding RTL support + creating a small function (I can do it) that analyse the string and each character and return the proper mapping for that character it will work fine..

please note that even without the RTL support. it's easy just reverse the order ex (abc) should be something like this (cba)
\uFEE3 م
\uFEA4 ح
\uFEE4 م
\uFEAA د
you can see that I've started with د and ended up with م

so I conclude by saying that it can be work around
and in the future if there are Arab programmers having the same issue please direct them to this post to help them understand how to get around this problem.
thanks again..
If I wrote a function or library that takes care of this automatic I'll be sure to post it here or in github or at lease provide a link to it.
Thanks again :D


[attachment deleted by admin]

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: arabic not rendered correctly
« Reply #17 on: July 03, 2012, 08:29:45 am »
Thank you very much for your feedback :)
Laurent Gomila - SFML developer