[mapserver-dev] Farsi right-to-left labels

Alan Boudreault aboudreault at mapgears.com
Sat Mar 15 15:53:07 EDT 2008


Yes fribidi2 have the joining implemented. I just get the confirmation 
from Behdad Esfahbod on the mailing list.
I surely going to try it this week.

Alan

Stephen Woodbridge wrote:
> I also came across fribidi2 whiich looks like it already has the 
> joining code implemented
>
> http://www.google.com/search?num=100&hl=en&newwindow=1&q=fribidi2
>
> and looks like it might be "rev 2" of the GNU fribidi code.
>
> Daniel, let me know if I can help you with test cases. I have a lot of 
> data with Arabic in it although I can not read Arabic myself.  I could 
> use this now if we had a patch or it was in svn instead of adding a 
> new column and populating it with the Perl script.
>
> Thanks,
>   -Steve W
>
> Alan Boudreault wrote:
>> Hi,
>>
>> I moved the thread in the mapserver-dev because i think it's the 
>> right place to be. :)
>>
>> I apply manually the patch from 
>> http://trac.osgeo.org/mapserver/ticket/956 to mapserver 5. It's 
>> working properly, but doesnt have the joining.
>> This patch use the GNU FriBidi library. The lastest stable version 
>> don't support arabic joining, but it seem to be in development. I 
>> don't know how is the progress for this support (i just subcribe the 
>> fribidi mailing list to have more information) but would you not 
>> rather wait for Lib Fribidi to support arabic joining rather than 
>> using yet another library ?
>>
>> I will give you more information later about the support of arabic 
>> joining.
>>
>> Alan
>>
>> Stephen Woodbridge wrote:
>>> Yes, I have used arabjoin.pl for the perl version
>>>
>>> http://user.cs.tu-berlin.de/~czyborra/arabjoin/arabjoin
>>>
>>> and I just started looking for a C langauge version and there a few 
>>> variations based on:
>>>
>>> http://www.koders.com/c/fid0CDEEAE48A82518AB622E67323B84AB525772AED.aspx?s=mp3 
>>>
>>> http://www.koders.com/c/fidD92D7571C80226F5F767189298750ACC8461B090.aspx?s=mp3 
>>>
>>> http://www.koders.com/c/fid6998723CE404855329383741EACE2197511ACDB6.aspx?s=mp3 
>>>
>>>
>>> This is a variation on the above but has a more complete and useful 
>>> example, and it will also handle Hebrew, Arabic, and maybe Farsi
>>>
>>> http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2F130.89.160.166%2Frockbox%2Farabjoin.c&ei=rlPYR6-8DZjEgQT43tymBQ&usg=AFQjCNFUtcluvex5eicUU4b70H_ok5vC7Q&sig2=m8TZs2uMbL8Te8f2Za0fVQ 
>>>
>>> http://www.google.com/search?num=100&hl=en&lr=&as_qdr=all&q=arabjoin.c++stdbool.h 
>>>
>>>
>>> -Steve W.
>>>
>>> Yewondwossen Assefa wrote:
>>>>
>>>>
>>>> Stephen Woodbridge wrote:
>>>>> Hi Daniel,
>>>>>
>>>>> I looked at the patch briefly.
>>>>> It doesn't seem to be doing character joining for works in Arabic.
>>>>>
>>>>> I'm thinking that if we had the algorithm to do the joining then 
>>>>> we could add that and maybe a Tag or metadata item that enabled 
>>>>> the joining  if needed. The joining algorithm, might be smart 
>>>>> enough to only join Arabic letters and leave the rest alone.
>>>>>
>>>>> If you are interested, I think I can get my hands on a perl script 
>>>>> that does the joining.
>>>>>
>>>>
>>>> Steve,
>>>>
>>>>  Isn't is what the function shape_arabic (from the PostArabic) 
>>>> module does?  If that is the case, the source code in C and an 
>>>> original perl source code are available on the web.
>>>>
>>>> Best Regards,
>>>>
>>>>
>>>>> -Steve W
>>>>>
>>>>> Daniel Morissette wrote:
>>>>>> Copying what I wrote earlier this morning on the ka-map list 
>>>>>> (sorry for those on both lists):
>>>>>>
>>>>>> FYI there is an open MapServer ticket about this:
>>>>>>   http://trac.osgeo.org/mapserver/ticket/956
>>>>>>
>>>>>> The ticket even includes a patch that you may want to try. I'll 
>>>>>> try to address this one for MapServer 5.2.
>>>>>>
>>>>>> Daniel
>>>>>>
>>>>>>
>>>>>> R Isfahani wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm trying to render some Farsi (Persian) labels on my map. As 
>>>>>>> you may know, Farsi words are written from right to left, just 
>>>>>>> like Hebrew.
>>>>>>> I've changed the label's encoding to 'Windows-1256' in my 
>>>>>>> mapfile and I'm using TrueType fonts. Farsi letters have 
>>>>>>> appeared. But the problem is that letters are in revers order 
>>>>>>> and letters are not joining properly.
>>>>>>> Of course reversing the letters' order in database will cause 
>>>>>>> the right order of them when rendering the map. But I wanna know 
>>>>>>> if there's any other way to show farsi labels in right order 
>>>>>>> with no joining problems.
>>>>>>>  
>>>>>>> [Actually, I'm using Ka-Map on the top of Mapserver to render my 
>>>>>>> maps on the web. Ka-Mappers told me that my problem is a kind of 
>>>>>>> Mapserver problems]
>>>>>>>
>>>>>>> Any new ideas are welcomed.
>>>>>>> Thanx.
>>>>>>>
>>>>>> _______________________________________________
>>>>>> mapserver-users mailing list
>>>>>> mapserver-users at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>>
>>>>> _______________________________________________
>>>>> mapserver-users mailing list
>>>>> mapserver-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>


-- 
Alan Boudreault
Mapgears
http://www.mapgears.com



More information about the mapserver-dev mailing list