Ticket #5923 (closed defect: fixed)

Bug contains 5 commit(s) | SVN Diffs for #5923

 

Opened 3 years ago

Last modified 2 years ago

In Arabic or Hebrew (all RTL scripts) getGlyphToCharMap returns wrong mapping

Reported by: sylwekbala@... Assigned to: eric
Priority: major Milestone: 3.9.1
Component: layout Version: 3.8
Keywords: Cc:
Load: Xref:
Java Version: Operating System: Windows XP and Linux RedHat 8.0
Project (C/J): ICU4C Weeks: 0.5
Review: srl

Description

In Arabic or Hebrew (supposedly in all RTL language scripts) getGlyphToCharMap returns wrong mapping. The mapping is incorrect in case of a wrapping. I checked it on the example "layout" delivered with ICU. When I change size of the window the text is wrapping from single line to many other lines. The problem appears only on RTL languages that the mapping for first indexes line is at the end in Unicodes. Below I tried to visualize the problem in the tables in the following format [number_glyph_in_single_line]:[glyph_index]:[mapping_getGlyphToCharMap_for_the_glyph]

Correct mapping (breaking line is not used) 0:915:10 1:942:9 2:1012:8 3:976:7 4:956:6 5:991:5 6:909:4 7:3:3 8:916:2 9:991:1 10:909:0

Incorrect mapping (breaking line is used) 0:3:10 1:916:9 2:991:8 3:909:7 0:1012:6 1:976:5 2:956:4 3:991:3 4:909:2 0:915:1 1:942:0

Incorrect mapping should be correct as below: 0:3:3 1:916:2 2:991:1 3:909:0 0:1012:8 1:976:7 2:956:6 3:991:5 4:909:4 0:915:10 1:942:9

I attached paragraph_bad_mapping.PNG, paragraph_good_mapping.PNG, Sample.txt and FontMap.GDI files

Attachments

paragraph_bad_mapping.PNG (5.3 kB) - added by sylwekbala@poczta.onet.pl on 09/10/07 05:43:03.
Wrong mapping
paragraph_good_mapping.PNG (6.1 kB) - added by sylwekbala@poczta.onet.pl on 09/10/07 05:43:22.
Correct mapping
FontMap.GDI (297 bytes) - added by sylwekbala@poczta.onet.pl on 09/10/07 05:45:15.
Fonts configuration file
Sample.txt (24 bytes) - added by sylwekbala@poczta.onet.pl on 09/10/07 05:45:37.
Example text input

Change History

09/10/07 05:43:03 changed by sylwekbala@...

  • attachment paragraph_bad_mapping.PNG added.

Wrong mapping

09/10/07 05:43:22 changed by sylwekbala@...

  • attachment paragraph_good_mapping.PNG added.

Correct mapping

09/10/07 05:45:15 changed by sylwekbala@...

  • attachment FontMap.GDI added.

Fonts configuration file

09/10/07 05:45:37 changed by sylwekbala@...

  • attachment Sample.txt added.

Example text input

09/10/07 17:24:38 changed by grhoten

  • owner changed from somebody to eric.
  • weeks set to 0.5.
  • xref changed.
  • revw changed.
  • milestone changed from UNSCH to 4.0.

10/02/07 10:41:12 changed by eric

  • status changed from new to assigned.
  • revw set to srl.

10/02/07 16:54:24 changed by srl

  • status changed from assigned to closed.
  • resolution set to fixed.

11/06/07 15:47:30 changed by eric

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 4.0 to 3.9.1.

I'm reopening this because Alexis Tamas at STG Interactive found that the fix did not work in all cases. In fact, the original fix only works if the whole paragraph is right to left text.

11/14/07 11:11:58 changed by eric

This bug is now ready for review.

12/20/07 14:00:30 changed by srl

  • status changed from reopened to closed.
  • resolution set to fixed.

Add/Change #5923 (In Arabic or Hebrew (all RTL scripts) getGlyphToCharMap returns wrong mapping)




Anti spam check: