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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mustafa

Pages: [1]
1
Graphics / Re: arabic not rendered correctly
« 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]

2
Graphics / Re: arabic not rendered correctly
« on: July 02, 2012, 02:05:47 pm »
I'll investigate more about the Pango library..
it seems it's on a rapid development and it's stable..
I'll see how to use it and possibly how to integrate it with SFML ..
I'll furthermore do some search about it's feature and compare it with freetype ..

This seems very promising:

http://www.flickr.com/photos/behdad/498812683/
http://www.pango.org/ScriptGallery

3
Graphics / Re: arabic not rendered correctly
« on: July 02, 2012, 01:21:49 pm »
I've tried hard coding the string same result.. :/
the problem is with freetype.. I'll check some alternative solution or I'll do what I can do to solve the problem..
if I've got an important update I'll post it to github issues..
:D
thanks again..
and by the way sfml is totally amazing..

4
Graphics / Re: arabic not rendered correctly
« on: July 02, 2012, 09:51:24 am »
I hope by adding it. it will fix the problem.
but from what I notice the render is rendering the arabic character as signle always
and adding ـ won't fix it.
because
مرحبا
is currently rendered as
ا ب ح ر م

and I think by adding RTL support it will be like this
م ر ح ب ا

adding ـ won't fix it I've used it as example only

because it will be something like this
ـ م

so what I suggest is we refer to this table

http://unicode.org/charts/PDF/UFE70.pdf

row 1 col FEE
row 2 col FEE
row 3 col FEE
row 4 col FEE

and please provide me with a code that can take array of unicode indexes so that we hard code it
what I mean and what I think the string is taken as (FEE1) while it should take it as (FEE3)

so if there is a way to take an array of indexes to the unicode table and we tell the Text class to render it.
it would be perfect for testing this.

also the problem might be with the editor because they usually they represent arabic character as a single presentation م and they leave it to the editor or the OS to make the proper tweaking so that if م comes before another character is represented in the other presentation. but I don't know how SFML is rendering it. and what library is using to do this task further more I don't know if this problem only with linux or with all platforms

finally I would like to thank you for your time and effort.
and please note that it's not that big of a deal. I just wanted to point this out.

Mustafa S.


5
Graphics / Re: arabic not rendered correctly
« on: July 02, 2012, 06:51:04 am »
yes that might be it..
another thing to note..
that in Arabic there are 4 presentation for the character

1)single
م
2)beginning
مـ
3)middle
ـمـ
4)end
ـم



6
Graphics / Re: arabic not rendered correctly
« on: July 02, 2012, 12:01:32 am »
So maybe if i include arabic characters inside a code tag it turns like that
Anyway thats what I wrote in the code
مرحبا

Let me try to but it in code tags
 
مرحبا

 

7
Graphics / Re: arabic not rendered correctly
« on: July 01, 2012, 11:57:24 pm »
Oh no i tried to write it in arabic but when i submit the post it turns like this
I will write something. In arabic to let you see what i mean
مرحبا

8
Graphics / arabic not rendered correctly
« on: July 01, 2012, 10:37:06 pm »
Greetings,,
please have a look at my code and the attached screenshot
#include <SFML/Graphics.hpp>
int main()
{
    sf::RenderWindow window(sf::VideoMode(300, 200), "hello");
        sf::Font mf;
        mf.loadFromFile("KacstArt.ttf");
        sf::Text text;
sf::String s(L"&#1605;&#1585;&#1581;&#1576;&#1575;");  // This suppose to be Arabic characters in here
        text.setString(s);
        //text.setFont(mf);
    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(text);
        window.display();
    }

    return 0;
}
 

any ideas how to fix this
Thanks

[attachment deleted by admin]

Pages: [1]