ID: 34670 Updated by: [EMAIL PROTECTED] Reported By: klaus at glashoff dot net -Status: Assigned +Status: Feedback Bug Type: GD related Operating System: Windows XP PHP Version: 6CVS Assigned To: pajoye New Comment:
Did that ever work? take #2 Previous Comments: ------------------------------------------------------------------------ [2005-09-28 14:18:22] [EMAIL PROTECTED] Thanks for the links, they are mostly what I'm using to port the Freetype backend to the newly added Unicode support in HEAD (php6). Did that ever work? For what I see, it seems like I will be able to really fixed that only in php6 using unicode (unicode strings passed to FT with correct glyphs set). ------------------------------------------------------------------------ [2005-09-28 14:14:40] klaus at glashoff dot net 1. The font can be downloaded from http://www.omkarananda-ashram.org/Sanskrit/itranslator2003.htm#dls 2. The expected result may be generated by any browser which can deal with the Unicode sequence I gave: क्&2340; What you will see (if an appropriate font has been installed) is a single glyph which is a conjunct of the glyph for "k" (क) and "t" (त). 3. The different results (text from the browser or image) may be seen on my testpage http://leuchtraum.de/translation/test/devatest.php?text=kt Please see also the source of the page. Try also input of "krtsna" or other conjuncts. (This test page is not perfect but hopefully sufficient to show the problem). 4. The Unicode directives for Devanagari are given in http://www.unicode.org/versions/Unicode4.0.0/ch09.pdf Table 9.2 on p. 229 is of relevance; also the pages before. ------------------------------------------------------------------------ [2005-09-28 12:49:26] [EMAIL PROTECTED] Please provide links to: - the font you use (Sanskrit2003.ttf) or are you using the font from www.omkarananda-ashram.org? - expected results (using another program if required) as images - actual result as images ------------------------------------------------------------------------ [2005-09-28 11:50:56] klaus at glashoff dot net Description: ------------ The results of imagettftext() are - at least for Indian languages - not totally satisfying: Consonant conjuncts appear as two consonants with virama. In order to display "kta" in Devanagari, imagettftext, for example, when given the argument " k + virama + t" (क्त) should return the conjunct for "kt", but it does not. (Instead of the font Sanskrit2003.ttf, use any Unicode font containing U+0900 - U+097F; for example mangal.ttf). Reproduce code: --------------- <?php Header ("Content-type: image/png"); $string ="क्त"; $string=rawurldecode($string); $im = imagecreate (200, 25); $white = ImageColorAllocate ($im,224,224,224); $black = ImageColorAllocate ($im,50,100,100); ImageTTFText ($im, 12, 0, 5, 15, $black, "Sanskrit2003.ttf", $string); ImagePng ($im); ImageDestroy ($im); ?> Expected result: ---------------- The Devanagari conjunct glyph for "kt" should appear, not a separate "k" with virama sign ्. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34670&edit=1