Ticket #6113 (assigned defect)

SVN Diffs for #6113

 

Opened 11 months ago

Last modified 4 months ago

incorrect mark positioning, e.g. on some Telugu clusters

Reported by: jonathan_kew@... Assigned to: eric (accepted)
Priority: major Milestone: 4.2
Component: layout Version: 3.6
Keywords: opentype, gpos Cc:
Load: ibm:100 Xref: 6290
Java Version: Operating System: any
Project (C/J): ICU4C Weeks: 2
Review:

Description

(Note that although this issue is being reported for ICU 3.6, the current code in Subversion does not appear to be changed in this area, so I believe it will still be present.)

ICU layout does not position marks (diacritics) correctly using MarkToBase attachment if there are other marks with non-zero advance between the mark being positioned and its base. This leads to incorrect rendering of the Gautami font (Telugu font shipped with Windows XP, etc).

Compare the character sequence <U+0C30, U+0C4D, U+0C30, U+0C3E> (RA, VIRAMA, RA, AA) as rendered by Uniscribe and by ICU (images to be attached). In both cases, the glyph sequence generated is <ra-consonant, aa-diacritic, conjunct-ra>. With Uniscribe, the conjunct-ra diacritic is placed directly below the base ra glyph, but with ICU it is offset to the right.

This happens because the intervening aa-diacritic has non-zero advance width, which shifts the default (unattached) position of the conjunct-ra. But in performing the mark-to-base attachment action, ICU just looks at the anchor points of the base and the mark, and makes the adjustment on the assumption that the mark is initially positioned at the advance of the base.

In investigating this issue, I have patched MarkToBasePosnSubtables (see attached patch file). This change gives correct rendering for the problem syllables with the Gautami font; however, I expect that similar problems in right-to-left text, and with LigatureToMark and MarkToMark attachments also need to be addressed. It may be that rather than patching all these places individually, there is a better place to make the correction.

Attachments

gautami.pdf (9.0 kB) - added by jonathan_kew@sil.org on 12/30/07 10:56:58.
example showing mark positioning error with Gautami font
MarkToBasePosnSubtables.cpp.patch (1.8 kB) - added by jonathan_kew@sil.org on 12/30/07 10:58:54.
patch for MarkToBasePosnSubtables.cpp providing *partial* fix for 6113

Change History

12/30/07 10:56:58 changed by jonathan_kew@...

  • attachment gautami.pdf added.

example showing mark positioning error with Gautami font

12/30/07 10:58:54 changed by jonathan_kew@...

  • attachment MarkToBasePosnSubtables.cpp.patch added.

patch for MarkToBasePosnSubtables.cpp providing *partial* fix for 6113

01/04/08 12:50:55 changed by eric

  • status changed from new to assigned.
  • xref changed.
  • milestone changed from UNSCH to 4.0.
  • owner changed from somebody to eric.
  • weeks set to .5.
  • revw changed.

05/21/08 11:51:42 changed by eric

  • xref set to 6290.

This is a specific instance of a general problem described in ticket:6290.

06/10/08 10:32:00 changed by eric

  • milestone changed from 4.0 to 4.2.

07/10/08 14:06:04 changed by yoshito

  • load set to ibm:100.

07/25/08 15:01:12 changed by eric

  • weeks changed from .5 to 2.

Actually, ticket:6290 is another specific instance of the same general problem: that mark positioning assumes that the previous mark and base glyphs have already been adjusted as needed. In some cases they may be adjusted in a different order, and in other cases, they may not have been adjusted at all.

The correct solution is to record the dependence on the other mark and base glyphs during positioning and make a separate pass at the end of positioning that does final adjustments. (As is done for cursive attachment.)

The original time estimate for this bug assumed that we could just take the supplied patch and expanded it a bit. The changes described above are considerably more complicated.


Add/Change #6113 (incorrect mark positioning, e.g. on some Telugu clusters)




Anti spam check: