<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Mangal;
        panose-1:2 4 5 3 5 2 3 3 2 2;}
@font-face
        {font-family:Mangal;
        panose-1:2 4 5 3 5 2 3 3 2 2;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thomas,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I had not found this and it does fill in the gaps in our understanding of where the problem lies.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>My assessment is that the current mapserver text render pipeline will not render the most complex characters correctly and needs updating.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>We are happy to be involved in this process and can provide development assistance once the preferred approach is agreed.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Do you have a recommendation? Can we use just HarfBuzz or do we need Pango to pull everything together?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> thomas bonfort [mailto:thomas.bonfort@gmail.com] <br><b>Sent:</b> Friday, April 05, 2013 6:51 AM<br><b>To:</b> Ian Walberg<br><b>Cc:</b> Stephen Woodbridge; mapserver-dev; MapserverList OSGEO<br><b>Subject:</b> Re: [mapserver-users] [mapserver-dev] Rendering Hindi Characters<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><a href="http://behdad.org/text/">http://behdad.org/text/</a> is a good read if you haven't already stumbled upon it.<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>--<o:p></o:p></p></div><div><p class=MsoNormal>thomas<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On 5 April 2013 15:45, Ian Walberg <<a href="mailto:ian.walberg@airborne.aero" target="_blank">ian.walberg@airborne.aero</a>> wrote:<o:p></o:p></p><p class=MsoNormal>Steve,<br><br>I will raise an issue to track this and we will be looking into it in more detail.<br><br>From the research we have done so far I am not sure that it is an issue with fribidi as my understanding that this just addresses the l->r and r->l ordering issues.<br><br>What we believe is that the mapserver text rendering pipeline cannot support the more complex character layouts required in some cases for Hinidi and other languages.<br><br>Regards<br><br>Ian<o:p></o:p></p><div><div><p class=MsoNormal><br>-----Original Message-----<br>From: <a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:mapserver-dev-bounces@lists.osgeo.org">mapserver-dev-bounces@lists.osgeo.org</a>] On Behalf Of Stephen Woodbridge<br>Sent: Friday, April 05, 2013 5:56 AM<br>To: mapserver-dev<br>Cc: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>Subject: Re: [mapserver-dev] [mapserver-users] Rendering Hindi Characters<br><br>Ian,<br><br>As I mentioned before, I think this is an issue with fribidi or the font that you are using. I have seen nothing that indicates that this is a mapserver problem other than the implied suggestion that maybe mapserver should find a different library to solve this issue.<br><br>Did you post this issue on the fribidi list?<br>Did you post the response back here?<br><br>I saw that you tried the text in other windows products and it works. I can appreciate your frustration with this fact, but this does not in itself mean the mapserver is broken. We rely on fribidi and the selected font to generate the correct glyphs for rendering. If the gylphs are not rendered correctly there are a few possibilities:<br><br>1. a bug in mapserver - not likely as we have plenty of working examples using multiple other languages 2. a bug/limitation in fribidi 3. a font file with missing or broken glyphs.<br><br>In most cases of rendering problems that we have seen to date have been problems with fonts. The fribidi list has been helpful identifying good fonts for specific languages.<br><br>If you want to file a bug on the mapserver site, goto <a href="http://mapserver.org/" target="_blank">http://mapserver.org/</a> and follow the link on the top right of the page to the issue tracker. You will need to supply a test case that demonstrates the problem and some graphics so non hindi readers can see what is bad and what is expected.<br><br>Without some more clear evidence that this is a mapserver problem, I'm not sure this will get much action.<br><br>I am sympathetic, as I ran into a similar issue with Arabic a few years ago and had to do this whole dance with fribidi to understand the issues and identify a font that resolved the issues.<br><br>-Steve W<br><br>On 4/4/2013 11:12 AM, Ian Walberg wrote:<br>> Folks,<br>><br>> Added the dev list, how do I raise a ticket on this?<br>><br>> Thanks<br>><br>> Ian<br>><br>> -----Original Message-----<br>> From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Ian<br>> Walberg<br>> Sent: Tuesday, April 02, 2013 2:34 PM<br>> To: Stephen Woodbridge; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> Subject: Re: [mapserver-users] Rendering Hindi Characters<br>><br>> Hello again list,<br>><br>> The Hindi rendering problem has come to the top of our priorities again and we have been investigating the cause of the issue again.<br>><br>> To recap the problem we are seeing can be reproduced easily, paste Mexico City into google translate and then use the Hindi characters with any Unicode font.<br>><br>> The top (incorrect)  line of text is from mapserver and lower<br>> (correct) line is from Excel in this image <a href="http://tinyurl.com/cs7pax5" target="_blank">http://tinyurl.com/cs7pax5</a><br>><br>>  From the research we have done freetype does not know how to render all of these characters together correctly. It does appear that pango can be configured to render them correctly.<br>><br>> I have not yet dived into the details of the rendering pipeline and I hope that someone can jump in and confirm we have a real issue and there is not something stupid we have done.<br>><br>> Many thanks<br>><br>> Ian<br>><br>> -----Original Message-----<br>> From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Stephen<br>> Woodbridge<br>> Sent: Wednesday, January 23, 2013 5:06 PM<br>> To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> Subject: Re: [mapserver-users] Rendering Hindi Characters<br>><br>> FYI, Mapserver does not do anything for rendering text except:<br>><br>> 1. pass the text to fribidi which converts a utf8 sequence of characters into a "displayable" sequence of characters.<br>><br>> 2. mapserver then passes that to the text rendering function of whatever renderer you are using.<br>><br>> Mapserver does not try to understand it, it totally relies on the underlying rendering code to do the right thing whatever that is.<br>><br>> Thomas Bonfort might have some more insight into this as he re-engineer a lot of the rendering pipeline and it might be helpful to know what code is doing the actual text rendering. It used to be freetype and may still be.<br>><br>> I'm also not convinced the fribidi is not the right place for this to happen regardless as it is responsible for taking a sequence of characters and generating an "displayable" sequence that can be rendered correctly given the correct font.<br>><br>> -Steve<br>><br>> On 1/23/2013 7:17 PM, Mr. Puneet Kishor wrote:<br>>> Peter,<br>>><br>>> My guru in all things Hindi fonts tells me that the problem lies at the level where encodings are converted into font renderings. Apparently, <span style='font-family:"Mangal","serif"'>र्</span> <span style='font-family:"Mangal","serif"'>ट</span> is a perfectly correct alternate rendering of the unicode, just not Correct (with a capital C). I have no idea where this happens with MapServer. Thankfully I've never had to create a map with Hindi labels (I would be curious to learn, perhaps off-list, who wants to see maps with Hindi labels), but I too would like to see this resolved.<br>>><br>>> Hope someone knowledgable chimes in.<br>>><br>>><br>>> On Jan 23, 2013, at 3:58 PM, "Mr. Puneet Kishor" <<a href="mailto:punk.kish@gmail.com">punk.kish@gmail.com</a>> wrote:<br>>><br>>>> (adding the list back to cc so brains better than mine may help)<br>>>><br>>>><br>>>> On Jan 23, 2013, at 3:47 PM, "Peter Mallen" <<a href="mailto:peter.mallen@airborne.aero">peter.mallen@airborne.aero</a>> wrote:<br>>>><br>>>>> Hi Puneet,<br>>>>><br>>>>> I have passed the codes you have provided into MapServer  (U+0930 U+094D U+091F ) and it displays the characters separately, not as one character.<br>>>>><br>>>>> This is how Map Server displays it: <span style='font-family:"Mangal","serif"'>र्</span> <span style='font-family:"Mangal","serif"'>ट</span><br>>>><br>>>><br>>>> hmmm... well, then this is definitely above my pay grade. Seems like you are doing the right thing, but my guess is MapServer's Unicode implementation is not working properly.<br>>>><br>>>> I don't see any mention of Unicode on mapserver docs page. The only<br>>>> potentially relevant bit I see is<br>>>> (<a href="http://www.mapserver.org/installation/unix.html#obtaining-the-neces" target="_blank">http://www.mapserver.org/installation/unix.html#obtaining-the-neces</a><br>>>> s<br>>>> ary-software) that libgd should be compiled against the iconv<br>>>> library which provides full support for Unicode. On my MBA I get<br>>>><br>>>>      $ ~ > gdlib-config --libs<br>>>>      -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng -lz -liconv<br>>>><br>>>><br>>>><br>>>>> Thank You,<br>>>>><br>>>>> Peter Mallen<br>>>>> -----Original Message-----<br>>>>> From: Mr. Puneet Kishor [mailto:<a href="mailto:punk.kish@gmail.com">punk.kish@gmail.com</a>]<br>>>>> Sent: Wednesday, January 23, 2013 3:36 PM<br>>>>> To: Peter Mallen<br>>>>> Subject: Re: [mapserver-users] Rendering Hindi Characters<br>>>>><br>>>>><br>>>>> On Jan 23, 2013, at 3:00 PM, "Peter Mallen" <<a href="mailto:peter.mallen@airborne.aero">peter.mallen@airborne.aero</a>> wrote:<br>>>>><br>>>>>> Hi Puneet,<br>>>>>><br>>>>>> I did try feeding MapServer the correct Unicode characters, and it did fix the characters using what I believe is called the "Reph" symbol (<span style='font-family:"Mangal","serif"'>ि</span>) but I could not get the conjunct consonants to display correctly.<br>>>>><br>>>>> I have no idea what the above means ;-), but, did you try passing<br>>>>> U+0930 U+094D U+091F to MapServer? See<br>>>>> <a href="http://www.unicode.org/charts/PDF/U0900.pdf" target="_blank">http://www.unicode.org/charts/PDF/U0900.pdf</a><br>>>>><br>>>>><br>>>>> U+0930 -> <span style='font-family:"Mangal","serif"'>र</span> -> r<br>>>>> U+094D ->  <span style='font-family:"Mangal","serif"'>्</span> -> "halves" the previously typed r 091F -> <span style='font-family:"Mangal","serif"'>ट</span> -> thick<o:p></o:p></p></div></div><p class=MsoNormal>>>>> U+t sound<o:p></o:p></p><div><div><p class=MsoNormal>>>>><br>>>>><br>>>>><br>>>>>> Also, I have posted on the fribidi list and I believe it does only help with bidirectional languages, but I could be wrong.<br>>>>>><br>>>>>> Thank You,<br>>>>>><br>>>>>> Peter Mallen<br>>>>>><br>>>>>> -----Original Message-----<br>>>>>> From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>>>>>> [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] On Behalf Of Mr.<br>>>>>> Puneet Kishor<br>>>>>> Sent: Wednesday, January 23, 2013 12:27 PM<br>>>>>> To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>>>>>> Subject: Re: [mapserver-users] Rendering Hindi Characters<br>>>>>><br>>>>>><br>>>>>> On Jan 23, 2013, at 12:17 PM, Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>> wrote:<br>>>>>><br>>>>>>> On 1/23/2013 2:20 PM, Peter Mallen wrote:<br>>>>>>>> Hello Everyone,<br>>>>>>>><br>>>>>>>> I am having issues rendering certain Hindi characters. I am<br>>>>>>>> using<br>>>>>>>> UTF-8 encoding.<br>>>>>>>><br>>>>>>>> When attempting to display the following Hindi character in<br>>>>>>>> MapServer: <span style='font-family:"Mangal","serif"'>र्ट</span><br>>>>>>>><br>>>>>>>> It is rendered in MapServer as the following two characters: <span style='font-family:"Mangal","serif"'>र्</span><br>>>>>>>> <span style='font-family:"Mangal","serif"'>ट</span><br>>>>>>>><br>>>>>>>> I believe these characters form what is called a conjunct<br>>>>>>>> consonant, of which there appear to be thousands of and most of<br>>>>>>>> them do not render using MapServer.<br>>>>>>>><br>>>>>>>> Also, It appears that MapServer is having an issue displaying<br>>>>>>>> these conjunct consonants and wants to display these characters<br>>>>>>>> separately rather than to form them as one combined character.<br>>>>>>>><br>>>>>>>> Here is a link describing more about the Devanagari alphabet:<br>>>>>>>> <a href="http://www.omniglot.com/writing/devanagari.htm" target="_blank">http://www.omniglot.com/writing/devanagari.htm</a><br>>>>>>>><br>>>>>>>> Can anyone please help with this?<br>>>>>>>><br>>>>>>>> Thank You,<br>>>>>>>><br>>>>>>>> Peter Mallen<br>>>>>>> Hi Peter,<br>>>>>>><br>>>>>>> I can not speak to this specific problem but I can give you and overview. Mapserver uses fribidi library for rending this data and I know from working with Arabic that a lot depends on the font you are using, in additional to the capabilities and version of fribidi library.<br>>>>>><br>>>>>><br>>>>>> Isn't fribidi specifically for bidirectional languages? Hindi is strictly LTR.<br>>>>>><br>>>>>><br>>>>>>> This kind of question is probably best asked on the fribidi list as they will know more about what is supported or not for any given language and they might be able to point you to a better font.<br>>>>>>><br>>>>>>> <a href="http://www.fribidi.org/" target="_blank">http://www.fribidi.org/</a><br>>>>>>><br>>>>>>> You should probably make sure you are using a recent version of the library like 0.19.2 or better and be aware the 0.19.5 was released in Dec 2012.<br>>>>>>><br>>>>>><br>>>>>> Peter, I forget where you and I left our off-list conversation re. the issues you were having with rendering Devnagari. Did you try feeding MapServer the correct Unicode characters?<br>>>>>><br>>>>>> Hope you figure this out.<br>>>>>><br>>>>>><br>>>>>> --<br>>>>>> Puneet Kishor<br>>> _______________________________________________<br>>> mapserver-users mailing list<br>>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>>><br>> _______________________________________________<br>> mapserver-users mailing list<br>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>> _______________________________________________<br>> mapserver-users mailing list<br>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>> _______________________________________________<br>> mapserver-users mailing list<br>> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br><br>_______________________________________________<br>mapserver-dev mailing list<br><a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>_______________________________________________<br>mapserver-users mailing list<br><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>