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

TC Haddad tchaddad at gmail.com
Wed Mar 12 15:37:24 PDT 2008


The Arabic and Farsi are going to have identical joining issues. So if
your code handles Arabic it *should* cover Farsi no problem.

In general joined letters are used in the middle of a word (like
cursive handwriting in english). Most Arabic words are composed almost
exclusively of joined letters. There is no such thing as "print" vs.
"cursive" - you would never write a multi-letter word using unjoined
letters in Arabic.

Unjoined letters are used when characters stand alone - either because
they are single-letter words, or because certain characters stand
alone by convention when used at the beginning or end of a word (sort
of like bookends).

The joined vs. unjoined version of any letter is stored in the font
just as an English font stores both lower and upper case characters.

Although the Arabic and Farsi look very similar, they do use slightly
different alphabets (some characters (and sounds) exist in Farsi that
don't exist in Arabic - maybe also vice versa).




On Wed, Mar 12, 2008 at 4:12 PM, Stephen Woodbridge
<woodbri at swoodbridge.com> 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
>



More information about the MapServer-users mailing list