After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 118297 - Double rendering of Yaphala mark
Double rendering of Yaphala mark
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: indic
1.2.x
Other Linux
: Normal normal
: 1.4.1
Assigned To: Pango Indic
Pango Indic
Depends on:
Blocks: 113551
 
 
Reported: 2003-07-25 13:48 UTC by Owen Taylor
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Readable version of revised patch (3.55 KB, patch)
2003-07-25 13:50 UTC, Owen Taylor
none Details | Review
Revised diff with whitespace changes (13.73 KB, patch)
2003-07-25 13:51 UTC, Owen Taylor
committed Details | Review
Incorrect rendering of Jafala with Pango HEAD (2.06 KB, image/jpeg)
2004-01-09 04:53 UTC, Sayamindu Dasgupta
  Details
Proposed patch against cvs HEAD (440 bytes, patch)
2004-01-22 06:26 UTC, Sayamindu Dasgupta
none Details | Review
Correct rendering with patch applied (20.51 KB, image/jpeg)
2004-01-22 06:27 UTC, Sayamindu Dasgupta
  Details

Description Owen Taylor 2003-07-25 13:48:55 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.
Comment 1 Owen Taylor 2003-07-25 13:50:59 UTC
Created attachment 18600 [details] [review]
Readable version of revised patch
Comment 2 Owen Taylor 2003-07-25 13:51:53 UTC
Created attachment 18601 [details] [review]
Revised diff with whitespace changes
Comment 3 Owen Taylor 2003-07-25 15:11:50 UTC
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)
Comment 4 Sayamindu Dasgupta 2004-01-09 04:51:57 UTC
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.
Comment 5 Sayamindu Dasgupta 2004-01-09 04:53:06 UTC
Created attachment 23142 [details]
Incorrect rendering of Jafala with Pango HEAD
Comment 6 Sayamindu Dasgupta 2004-01-22 06:26:36 UTC
Created attachment 23625 [details] [review]
Proposed patch against cvs HEAD
Comment 7 Sayamindu Dasgupta 2004-01-22 06:27:39 UTC
Created attachment 23626 [details]
Correct rendering with patch applied
Comment 8 Sayamindu Dasgupta 2004-03-14 20:38:20 UTC
Can this bug be reopened. Yafala is quite heavily used in Bangla, and
this needs to be fixed. 
Comment 9 Owen Taylor 2004-03-14 20:44:29 UTC
We need an explanation of the change.
Comment 10 Sayamindu Dasgupta 2004-03-15 17:14:06 UTC
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. 
Comment 11 Owen Taylor 2004-07-30 19:50:53 UTC
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?
Comment 12 Sayamindu Dasgupta 2004-08-01 13:46:05 UTC
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.