GNOME Bugzilla – Bug 118297
Double rendering of Yaphala mark
Last modified: 2004-12-22 21:47:04 UTC
Trying to keep track of the four different issues in bug 113551 was pretty much impossible for me, so splitting up the comments into separate bug reports. * unmadindu@Softhome.net (Sayamindu Dasgupta): 1. Yaphala --------------- a. The string য্য is rendered incorrectly. For some reasons, the Yafala mark is getting rendered twice. More information on yaphala can be found at http://www.microsoft.com/typography/otfntdev/bengalot/features.htm (section on "Post-base form of consonant") * Additional Comments From Taneem Ahmed 2003-05-31 21:30: Here is a small patch for 1a. This seems like a problem with indic-ot, not just Bengali. I am not quite sure if the patch is correct for other languages but it works for Bengali, and I am hoping it will give Owen some indication about what is the real problem. * Additional Comments From Owen Taylor 2003-06-01 01:22: I don't think the patch is quite right, having multiple post base forms is allowed in Bengali, I believe, and your patch will prevent such cases from rendering correctly. See: http://oss.software.ibm.com/cvs/icu/icu/source/layout/IndicReordering.cpp.diff?r1=1.8&r2=1.9 For how the problem was fixed in ICU. The immediately relevant part of the patch is the change: - while (baseConsonant >= baseLimit) { + while (baseConsonant > baseLimit) { But probably the other parts of the patch need to be ported to Pango as well. * Additional Comments From Taneem Ahmed 2003-06-01 01:32: I am quite sure (99%) you can't have multiple post-base in Bengali (I am not sure about other indic languages). In Bengali only 0x09AF has post-base form, and I haven't seen any word where it repeats itself. I am not sure how to test the other languages. I'll try out what you mentioned Owen, but I doubt I can port all the changes from ICU to Pango anytime soon... * Additional Comments From Taneem Ahmed 2003-06-01 02:10 Okay, seems like there weren't too many ICU changes for the reorder function. Attached is the port of the diff you pointed out. Please take a look and see if you can come up with an official patch some time soon. * Additional Comments From Owen Taylor 2003-06-01 04:04 I've attached two copies of a version of version of your backport - the first for legibility is with diff -w, (ignore whitespace),the second is a diff that can be applied. Changes from your version: - Remove 'if (lastConsonant >= prev) {' and reindent - Get the other part of the ICU change (remove pstf from base consonants) as well. - Remove code that you only #if 0'ed. If you could check whether this fixes 1a for you, that would be appreciated.
Created attachment 18600 [details] [review] Readable version of revised patch
Created attachment 18601 [details] [review] Revised diff with whitespace changes
Fri Jul 25 11:06:14 2003 Owen Taylor <otaylor@redhat.com> * modules/indic/indic-ot.[ch]: Port of some fixes from ICU. "Fixed problems w/ backing off the front of a syllable if all consonants have post-base form... Fix tag list for base consonant so that it doesn't have 'pstf'"" Based on patch from Taneem Ahmed (#118297)
It seems that the latest version Pango (HEAD) is having problems with the jafala again. Now none of the jafala-s are rendered correctly. I am attaching a screenshot.
Created attachment 23142 [details] Incorrect rendering of Jafala with Pango HEAD
Created attachment 23625 [details] [review] Proposed patch against cvs HEAD
Created attachment 23626 [details] Correct rendering with patch applied
Can this bug be reopened. Yafala is quite heavily used in Bangla, and this needs to be fixed.
We need an explanation of the change.
In the snippet from indic-ot.c (lines 374-378) if (baseConsonant != lastConsonant) { if (postBase <= lastConsonant) { for (i = postBase; i <= lastConsonant; i += 1) { writeChar(&output, chars[i], /*i*/ prev, nukt_p); } when nukt_p = (junk | dist | rphf | blwf | half | pstf), the Post Base Form feature (pstf) is *not* being applied. nukt_p = (junk | dist | rphf | blwf | half ) seems to fix that.
I think the change I put into CVS yesterday: Thu Jul 29 16:10:06 2004 Owen Taylor <otaylor@redhat.com> * modules/indic/indic-ot.[ch]: Add a new feature set pstf_p and use it for post-base consonants, since the existing nukt_p suppressed the pstf feature. (#121671, Rajkumar S) should fix your problem. Can you retest with current CVS and see if that works? If not, can you provide the source strings that you are using to make the screenshots?
Yep - it works. Thanks a lot - we really appreciate the work you have been doing to ensure that our script renders flawlessly in Free Software.