Submitted by noon_eg on Sun, 27/02/2005 - 12:41.
( categories: Programming )

hi all,

i am new to this forum, hope to be active member

i have open source IMS project (Internet Map Server), i need to correctly display arabic charaters on the generated Maps.

The data is stored into database with codeset UTF-8.

After reading the UTF-8 arabic string into C char array, i need to convert it to visual character string (glyph code for example) to be able to draw this arabic text connectly on the Map.

i have the fribidi installed on my linux machine, but i donot know exactly what the needed steps to convert the arabic string to visual shape and do the auto-shaping and Right_to Left

can anyone layout what this process :)

thanks in advance


MohammedSameer's picture
Submitted by MohammedSameer on Sun, 27/02/2005 - 13:16.

So I assume that you need a way to do bidi and shaping with fribidi ? fribidi can do the bidi thing, But it can't do shaping yet and it seem that i'll fork fribidi soon to add shaping to it. I have a GPL'ed code for the shaping but it's dependant on glib. I'll look for it when I go home.

I didn't really understand what you want to do and what's the relation between MS project and opensource ?


-- I was known as Uniball!
WWW: http://www.foolab.org/
Quote "c u next life time then when i come back as a mug of tea :P"


Submitted by noon_eg on Sun, 27/02/2005 - 13:36.

the internet map server IMS has nothing to do with Microsoft

it is a map publishing tool on the internet ( web enabled GIS system )

i need to bidi and autoshape the arabic string,

can u provide me with sample source code that do these tow steps even by using the fridbidi & gtk calls ?

Regards,

hany heggy

MohammedSameer's picture
Submitted by MohammedSameer on Sun, 27/02/2005 - 13:54.

My bad! I thought it was MS project not IMS project.

Anyway, I don't fully understand fribidi but I'm sure I can use it, Can you give me a few hours until today night ? And you'll have it!


-- I was known as Uniball!
WWW: http://www.foolab.org/
Quote "c u next life time then when i come back as a mug of tea :P"


MohammedSameer's picture
Submitted by MohammedSameer on Mon, 28/02/2005 - 00:56.

Ok, I can't really remember how I used fribidi before, But i'm sure it was the function fribidi_log2vis();

I'll try to dig tomorrow but I'm not sure i'll find time. you can have a look at the fribidi binary and see how it's using the function.

I actually don't understand all of the fribidi internals and I feel it's "over engineered"!

Here's the shaping code, I thought that i've lost it, Thank god I found it here: http://cvs.arabeyes.org/viewcvs/tools/shape_bidi/

You'll find nadim's original perl implementation and my C port.


-- I was known as Uniball!
WWW: http://www.foolab.org/
Quote "c u next life time then when i come back as a mug of tea :P"


Submitted by noon_eg on Tue, 01/03/2005 - 17:24.

thanks for your help

the shaping program works fine, but i still cannot get the desired result

i could only run auto-shape and get the letters auto-shaped but in L2R direction, when i try fribidi on the auto-shaped string, it does not understand the encoding of visual shapes

if i use fribidi 1st the auto-shaping code does not work correctly as it reads from L2R

i wonder should i use fribidi 1st then auto-shape or vice versa ?

Regards,

hany heggy

MohammedSameer's picture
Submitted by MohammedSameer on Sat, 05/03/2005 - 02:51.

What do u mean by "the code doesn't work" ?


-- I was known as Uniball!
WWW: http://www.foolab.org/
Quote "c u next life time then when i come back as a mug of tea :P"


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.