Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-17 Thread Stephen Woodbridge

Jackey,

Try locating a different font. if the text is being rendered as glyphs 
and they look correct, but is missing the joining information, it is 
likely that the font you are using does not include the joining glyphs.


If you are using a windows machine, try getting mapserver via the 
fonts.txt file to point to the arial.ttf in the fonts folder. And change 
you FONT "..." to select the windows arial font. This assumes that you 
can display arabic text correctly using the arial font from a windows 
application like excel.


-Steve W.

Jackey Cheung wrote:

Greetings!


We've build the MapServer 5.2 on a Linux server, with fribidi2 0.19.1, to
try show Arabic labels. But the words has been broken down to characters in
the generated images (line.png). Then we've tried on a MS4W 2.3.0 server,
but the images (ms4w.png) are even worse.

We are using PostGIS, and the database is using UTF8 (pgpr.png), while all
Arabic data can be shown correctly (pg.png) on my English Windows XP, and

we've tried some more machines, or on IE, to make sure that Arabic text in
database are really UTF8.

Here's the images: http://www3.mapasia.com/jackout/ara.png


The part of the map file is as follow, where the "arbic-trans" is a Arabic
TrueType font named "Arabic Transparent":
LABEL
ANGLE FOLLOW
PRIORITY [priority]
ENCODING "UTF-8"
COLOR 0 0 0
OUTLINECOLOR 255 255 255
TYPE TRUETYPE
FONT "arbic-trans"
SIZE 7
POSITION AUTO
PARTIALS FALSE
MINDISTANCE 500
BUFFER 1
MINFEATURESIZE 50
END

Could anyone please help.






___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-17 Thread Jackey Cheung
Steve,

Thanks for the advise, but we've tried the Arial font already in the first
test, it's just the same. We thought it was the fribidi2's problem since
0.19.1 doesn't have their configure script changed, and tried the 0.10.9,
but it's all the same, every word is broken.


On Mon, Nov 17, 2008 at 11:15 PM, Stephen Woodbridge <
[EMAIL PROTECTED]> wrote:

> Jackey,
>
> Try locating a different font. if the text is being rendered as glyphs and
> they look correct, but is missing the joining information, it is likely that
> the font you are using does not include the joining glyphs.
>
> If you are using a windows machine, try getting mapserver via the fonts.txt
> file to point to the arial.ttf in the fonts folder. And change you FONT
> "..." to select the windows arial font. This assumes that you can display
> arabic text correctly using the arial font from a windows application like
> excel.
>
> -Steve W.
>
> Jackey Cheung wrote:
>
>> Greetings!
>>
>>
>> We've build the MapServer 5.2 on a Linux server, with fribidi2 0.19.1, to
>> try show Arabic labels. But the words has been broken down to characters
>> in
>> the generated images (line.png). Then we've tried on a MS4W 2.3.0 server,
>> but the images (ms4w.png) are even worse.
>>
>> We are using PostGIS, and the database is using UTF8 (pgpr.png), while all
>> Arabic data can be shown correctly (pg.png) on my English Windows XP, and
>>
>> we've tried some more machines, or on IE, to make sure that Arabic text in
>> database are really UTF8.
>>
>> Here's the images: http://www3.mapasia.com/jackout/ara.png
>>
>>
>> The part of the map file is as follow, where the "arbic-trans" is a Arabic
>> TrueType font named "Arabic Transparent":
>> LABEL
>> ANGLE FOLLOW
>> PRIORITY [priority]
>> ENCODING "UTF-8"
>> COLOR 0 0 0
>> OUTLINECOLOR 255 255 255
>> TYPE TRUETYPE
>> FONT "arbic-trans"
>> SIZE 7
>> POSITION AUTO
>> PARTIALS FALSE
>> MINDISTANCE 500
>> BUFFER 1
>> MINFEATURESIZE 50
>> END
>>
>> Could anyone please help.
>>
>>
>>
>>
>> 
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-17 Thread Dane Springmeyer

Jackey,

I don't have experience rendering arabic fonts, but I wonder if the  
ticket for supporting Indic Fonts might provide some clues for your  
further testing:

http://trac.osgeo.org/mapserver/ticket/2591

Dane

On Nov 17, 2008, at 4:55 PM, Jackey Cheung wrote:


Steve,

Thanks for the advise, but we've tried the Arial font already in the  
first test, it's just the same. We thought it was the fribidi2's  
problem since 0.19.1 doesn't have their configure script changed,  
and tried the 0.10.9, but it's all the same, every word is broken.



On Mon, Nov 17, 2008 at 11:15 PM, Stephen Woodbridge <[EMAIL PROTECTED] 
> wrote:

Jackey,

Try locating a different font. if the text is being rendered as  
glyphs and they look correct, but is missing the joining  
information, it is likely that the font you are using does not  
include the joining glyphs.


If you are using a windows machine, try getting mapserver via the  
fonts.txt file to point to the arial.ttf in the fonts folder. And  
change you FONT "..." to select the windows arial font. This assumes  
that you can display arabic text correctly using the arial font from  
a windows application like excel.


-Steve W.

Jackey Cheung wrote:
Greetings!


We've build the MapServer 5.2 on a Linux server, with fribidi2  
0.19.1, to
try show Arabic labels. But the words has been broken down to  
characters in
the generated images (line.png). Then we've tried on a MS4W 2.3.0  
server,

but the images (ms4w.png) are even worse.

We are using PostGIS, and the database is using UTF8 (pgpr.png),  
while all
Arabic data can be shown correctly (pg.png) on my English Windows  
XP, and


we've tried some more machines, or on IE, to make sure that Arabic  
text in

database are really UTF8.

Here's the images: http://www3.mapasia.com/jackout/ara.png


The part of the map file is as follow, where the "arbic-trans" is a  
Arabic

TrueType font named "Arabic Transparent":
LABEL
ANGLE FOLLOW
PRIORITY [priority]
ENCODING "UTF-8"
COLOR 0 0 0
OUTLINECOLOR 255 255 255
TYPE TRUETYPE
FONT "arbic-trans"
SIZE 7
POSITION AUTO
PARTIALS FALSE
MINDISTANCE 500
BUFFER 1
MINFEATURESIZE 50
END

Could anyone please help.






___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-17 Thread Jackey Cheung
I've located the problem, it seems that the TTF font (Arabic Transparent) is
not 100% unicode safe. And maybe I've messed something up, so that the font
Arial didn't produce the correct result. But now I can use Arial to produce
image.

However, there still seems to be a slight problem (well, I'm not sure
whether it is a proble, since I can't read Arabic). When the label has an
angle, the words are broken a bit. Although they are using the joined
character but there are tiny gaps between them.

On Mon, Nov 17, 2008 at 11:15 PM, Stephen Woodbridge <
[EMAIL PROTECTED]> wrote:

> Jackey,
>
> Try locating a different font. if the text is being rendered as glyphs and
> they look correct, but is missing the joining information, it is likely that
> the font you are using does not include the joining glyphs.
>
> If you are using a windows machine, try getting mapserver via the fonts.txt
> file to point to the arial.ttf in the fonts folder. And change you FONT
> "..." to select the windows arial font. This assumes that you can display
> arabic text correctly using the arial font from a windows application like
> excel.
>
> -Steve W.
>
> Jackey Cheung wrote:
>
>> Greetings!
>>
>>
>> We've build the MapServer 5.2 on a Linux server, with fribidi2 0.19.1, to
>> try show Arabic labels. But the words has been broken down to characters
>> in
>> the generated images (line.png). Then we've tried on a MS4W 2.3.0 server,
>> but the images (ms4w.png) are even worse.
>>
>> We are using PostGIS, and the database is using UTF8 (pgpr.png), while all
>> Arabic data can be shown correctly (pg.png) on my English Windows XP, and
>>
>> we've tried some more machines, or on IE, to make sure that Arabic text in
>> database are really UTF8.
>>
>> Here's the images: http://www3.mapasia.com/jackout/ara.png
>>
>>
>> The part of the map file is as follow, where the "arbic-trans" is a Arabic
>> TrueType font named "Arabic Transparent":
>> LABEL
>> ANGLE FOLLOW
>> PRIORITY [priority]
>> ENCODING "UTF-8"
>> COLOR 0 0 0
>> OUTLINECOLOR 255 255 255
>> TYPE TRUETYPE
>> FONT "arbic-trans"
>> SIZE 7
>> POSITION AUTO
>> PARTIALS FALSE
>> MINDISTANCE 500
>> BUFFER 1
>> MINFEATURESIZE 50
>> END
>>
>> Could anyone please help.
>>
>>
>>
>>
>> 
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
<><>___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-18 Thread Stephen Woodbridge

Jackey,

I'm not sure how much more I can help other than to say:

1) make sure you are building with fribidi2 version 0.19.1+
2) Since character are generated individually on rotated labels, there 
may be an issue. Thomas Bonfort would be the person that implemented the 
AGG. You should probably try doing this with the AGG driver if you have 
not tried that yet. That is what I'm using.

3) try to locate a better/different font that supports Arabic

-Steve

Jackey Cheung wrote:

Steve,

Thanks for the advise, but we've tried the Arial font already in the 
first test, it's just the same. We thought it was the fribidi2's problem 
since 0.19.1 doesn't have their configure script changed, and tried the 
0.10.9, but it's all the same, every word is broken.



On Mon, Nov 17, 2008 at 11:15 PM, Stephen Woodbridge 
<[EMAIL PROTECTED] > wrote:


Jackey,

Try locating a different font. if the text is being rendered as
glyphs and they look correct, but is missing the joining
information, it is likely that the font you are using does not
include the joining glyphs.

If you are using a windows machine, try getting mapserver via the
fonts.txt file to point to the arial.ttf in the fonts folder. And
change you FONT "..." to select the windows arial font. This assumes
that you can display arabic text correctly using the arial font from
a windows application like excel.

-Steve W.

Jackey Cheung wrote:

Greetings!


We've build the MapServer 5.2 on a Linux server, with fribidi2
0.19.1, to
try show Arabic labels. But the words has been broken down to
characters in
the generated images (line.png). Then we've tried on a MS4W
2.3.0 server,
but the images (ms4w.png) are even worse.

We are using PostGIS, and the database is using UTF8 (pgpr.png),
while all
Arabic data can be shown correctly (pg.png) on my English
Windows XP, and

we've tried some more machines, or on IE, to make sure that
Arabic text in
database are really UTF8.

Here's the images: http://www3.mapasia.com/jackout/ara.png


The part of the map file is as follow, where the "arbic-trans"
is a Arabic
TrueType font named "Arabic Transparent":
LABEL
ANGLE FOLLOW
PRIORITY [priority]
ENCODING "UTF-8"
COLOR 0 0 0
OUTLINECOLOR 255 255 255
TYPE TRUETYPE
FONT "arbic-trans"
SIZE 7
POSITION AUTO
PARTIALS FALSE
MINDISTANCE 500
BUFFER 1
MINFEATURESIZE 50
END

Could anyone please help.






___
mapserver-users mailing list
mapserver-users@lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/mapserver-users





___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-18 Thread TC Haddad
on re-reading Steve W's point #2 - perhaps the specific bug is that
there is a difference with when in the sequence of drawing,
OUTLINECOLOR is applied

i) when ANGLE is AUTO, OUTLINECOLOR is applied after the whole label is drawn

ii) when ANGLE is FOLLOW, OUTLINECOLOR is applied after each letter is drawn

so this ends up making a joined Arabic label look "fractured" if both
OUTLINECOLOR and ANGLE FOLLOW are used at the same time.

TH

On Tue, Nov 18, 2008 at 12:32 PM, TC Haddad <[EMAIL PROTECTED]> wrote:
> Jackey,
>
> I can read Arabic, and from the most recent attachments you sent I
> think the labels are printing fine. That is,  I do see the problem you
> are referring to, but the cause is not the font (the joined letters
> are as they should be).
>
> The real problem that I see is the fact that you are using
> OUTLINECOLOR. This is putting a 1 pixel white outline on *each*
> letter.
>
> This approach works in English and languages where the letters don't
> attach in printed form. But in Arabic, where whole worlds are joined,
> the outline should be applied at the level of the word, not at the
> level of the letter.
>
> As far as I know this feature does not exist in Mapserver at the
> moment, so it would have to be requested.
>
> Tanya
>
>
>
> On Tue, Nov 18, 2008 at 12:14 PM, Stephen Woodbridge
> <[EMAIL PROTECTED]> wrote:
>> Jackey,
>>
>> I'm not sure how much more I can help other than to say:
>>
>> 1) make sure you are building with fribidi2 version 0.19.1+
>> 2) Since character are generated individually on rotated labels, there may
>> be an issue. Thomas Bonfort would be the person that implemented the AGG.
>> You should probably try doing this with the AGG driver if you have not tried
>> that yet. That is what I'm using.
>> 3) try to locate a better/different font that supports Arabic
>>
>> -Steve
>>
>> Jackey Cheung wrote:
>>>
>>> Steve,
>>>
>>> Thanks for the advise, but we've tried the Arial font already in the first
>>> test, it's just the same. We thought it was the fribidi2's problem since
>>> 0.19.1 doesn't have their configure script changed, and tried the 0.10.9,
>>> but it's all the same, every word is broken.
>>>
>>>
>>> On Mon, Nov 17, 2008 at 11:15 PM, Stephen Woodbridge
>>> <[EMAIL PROTECTED] > wrote:
>>>
>>>Jackey,
>>>
>>>Try locating a different font. if the text is being rendered as
>>>glyphs and they look correct, but is missing the joining
>>>information, it is likely that the font you are using does not
>>>include the joining glyphs.
>>>
>>>If you are using a windows machine, try getting mapserver via the
>>>fonts.txt file to point to the arial.ttf in the fonts folder. And
>>>change you FONT "..." to select the windows arial font. This assumes
>>>that you can display arabic text correctly using the arial font from
>>>a windows application like excel.
>>>
>>>-Steve W.
>>>
>>>Jackey Cheung wrote:
>>>
>>>Greetings!
>>>
>>>
>>>We've build the MapServer 5.2 on a Linux server, with fribidi2
>>>0.19.1, to
>>>try show Arabic labels. But the words has been broken down to
>>>characters in
>>>the generated images (line.png). Then we've tried on a MS4W
>>>2.3.0 server,
>>>but the images (ms4w.png) are even worse.
>>>
>>>We are using PostGIS, and the database is using UTF8 (pgpr.png),
>>>while all
>>>Arabic data can be shown correctly (pg.png) on my English
>>>Windows XP, and
>>>
>>>we've tried some more machines, or on IE, to make sure that
>>>Arabic text in
>>>database are really UTF8.
>>>
>>>Here's the images: http://www3.mapasia.com/jackout/ara.png
>>>
>>>
>>>The part of the map file is as follow, where the "arbic-trans"
>>>is a Arabic
>>>TrueType font named "Arabic Transparent":
>>>LABEL
>>>ANGLE FOLLOW
>>>PRIORITY [priority]
>>>ENCODING "UTF-8"
>>>COLOR 0 0 0
>>>OUTLINECOLOR 255 255 255
>>>TYPE TRUETYPE
>>>FONT "arbic-trans"
>>>SIZE 7
>>>POSITION AUTO
>>>PARTIALS FALSE
>>>MINDISTANCE 500
>>>BUFFER 1
>>>MINFEATURESIZE 50
>>>END
>>>
>>>Could anyone please help.
>>>
>>>
>>>
>>>
>>>
>>>  
>>>
>>>___
>>>mapserver-users mailing list
>>>mapserver-users@lists.osgeo.org
>>>
>>>http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>>
>>
>> ___
>> mapserver-users mailing list
>> mapserver-users@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo

Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-18 Thread TC Haddad
Jackey

I've subscribed to your ticket in case I can be of further help down the road.

In the meantime, based on looking at your last example, the labels
without OUTLINECOLOR are pretty good, the one thing I would recommend
further is decreasing your font size by a point or two. This will
minimize the occurence of small fractures that happen when the label
bends around a tight curve (something almost inevitable).

On Tue, Nov 18, 2008 at 5:27 PM, Jackey Cheung <[EMAIL PROTECTED]> wrote:

> Following TC's suggestion, I've done a test.
>
> With this map file layer:
>
> LAYER
> NAME"road"
> STATUSDEFAULT
> TYPELINE
> UNITSMETERS
> CONNECTIONTYPEPOSTGIS
> CONNECTION"host=localhost dbname=ttt user=uuu
> password=xxx"
> DATA"geom FROM view_road_ar USING UNIQUE
> oid USING SRID=4326"
>
> LABELITEM"name"
>
> CLASS
> STYLE
> WIDTH16
> COLOR0 0 0
> ANTIALIASTRUE
> END
> STYLE
> WIDTH15.8
> COLOR255 200 64
> ANTIALIASTRUE
> END
> LABEL
> ANGLEFOLLOW
> ENCODING"UTF-8"
> COLOR0 0 0
> OUTLINECOLOR255 255 255
> TYPETRUETYPE
> FONTarial
> SIZE24
> ANTIALIASTRUE
> POSITIONAUTO
> PARTIALSFALSE
> BUFFER50
> END
> END
> END
>
> With nothing changed, only change the ANGLE to AUTO and FOLLOW, the
> generated images confirms the different processs of ANGLE AUTO & FOLLOW.
> Then I've done one more test which uses ANGLE FOLLOW, but with OUTLINECOLOR
> removed, then generated image shows "fractured" words.
>
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Failed to show Arabic labels with MapServer 5.2

2008-11-20 Thread thomas bonfort
hi,
yes this is the behavior that's used (with agg, but gd also): the
label text is split in individual characters, and each one is rendered
individually with a specific position and angle, and therefore the
joining between characters is lost (this isn't specific to the
outlining case, as can be seen on jackey's "no_outline" example).

Unfortunately, there's no simple fix, and even if so this would
require rewriting the entire angle follow code. This would require
that the text be rendered in one pass, following a smoothed curve that
fits the line geometry. AGG can sort of do this (see the trans_curve
examples in your agg source dir or on the website
http://antigrain.com/demo/index.html), but the characters are
deformed. It's an option that I have tested locally but gave up with
seeing the quality of the results.

does anyone have experience with pango and know if it could solve this problem ?

cheers,
thomas



On Tue, Nov 18, 2008 at 21:50, TC Haddad <[EMAIL PROTECTED]> wrote:
> on re-reading Steve W's point #2 - perhaps the specific bug is that
> there is a difference with when in the sequence of drawing,
> OUTLINECOLOR is applied
>
> i) when ANGLE is AUTO, OUTLINECOLOR is applied after the whole label is drawn
>
> ii) when ANGLE is FOLLOW, OUTLINECOLOR is applied after each letter is drawn
>
> so this ends up making a joined Arabic label look "fractured" if both
> OUTLINECOLOR and ANGLE FOLLOW are used at the same time.
>
> TH
>
> On Tue, Nov 18, 2008 at 12:32 PM, TC Haddad <[EMAIL PROTECTED]> wrote:
>> Jackey,
>>
>> I can read Arabic, and from the most recent attachments you sent I
>> think the labels are printing fine. That is,  I do see the problem you
>> are referring to, but the cause is not the font (the joined letters
>> are as they should be).
>>
>> The real problem that I see is the fact that you are using
>> OUTLINECOLOR. This is putting a 1 pixel white outline on *each*
>> letter.
>>
>> This approach works in English and languages where the letters don't
>> attach in printed form. But in Arabic, where whole worlds are joined,
>> the outline should be applied at the level of the word, not at the
>> level of the letter.
>>
>> As far as I know this feature does not exist in Mapserver at the
>> moment, so it would have to be requested.
>>
>> Tanya
>>
>>
>>
>> On Tue, Nov 18, 2008 at 12:14 PM, Stephen Woodbridge
>> <[EMAIL PROTECTED]> wrote:
>>> Jackey,
>>>
>>> I'm not sure how much more I can help other than to say:
>>>
>>> 1) make sure you are building with fribidi2 version 0.19.1+
>>> 2) Since character are generated individually on rotated labels, there may
>>> be an issue. Thomas Bonfort would be the person that implemented the AGG.
>>> You should probably try doing this with the AGG driver if you have not tried
>>> that yet. That is what I'm using.
>>> 3) try to locate a better/different font that supports Arabic
>>>
>>> -Steve
>>>
>>> Jackey Cheung wrote:

 Steve,

 Thanks for the advise, but we've tried the Arial font already in the first
 test, it's just the same. We thought it was the fribidi2's problem since
 0.19.1 doesn't have their configure script changed, and tried the 0.10.9,
 but it's all the same, every word is broken.


 On Mon, Nov 17, 2008 at 11:15 PM, Stephen Woodbridge
 <[EMAIL PROTECTED] > wrote:

Jackey,

Try locating a different font. if the text is being rendered as
glyphs and they look correct, but is missing the joining
information, it is likely that the font you are using does not
include the joining glyphs.

If you are using a windows machine, try getting mapserver via the
fonts.txt file to point to the arial.ttf in the fonts folder. And
change you FONT "..." to select the windows arial font. This assumes
that you can display arabic text correctly using the arial font from
a windows application like excel.

-Steve W.

Jackey Cheung wrote:

Greetings!


We've build the MapServer 5.2 on a Linux server, with fribidi2
0.19.1, to
try show Arabic labels. But the words has been broken down to
characters in
the generated images (line.png). Then we've tried on a MS4W
2.3.0 server,
but the images (ms4w.png) are even worse.

We are using PostGIS, and the database is using UTF8 (pgpr.png),
while all
Arabic data can be shown correctly (pg.png) on my English
Windows XP, and

we've tried some more machines, or on IE, to make sure that
Arabic text in
database are really UTF8.

Here's the images: http://www3.mapasia.com/jackout/ara.png


The part of the map file is as follow, where the "arbic-trans"
is a Arabic
TrueType font named "Arabic Trans