Bug 39351 - incorrect FORMATTING of Arabic Subtending marks
Summary: incorrect FORMATTING of Arabic Subtending marks
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
3.4.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Khaled Hosny
QA Contact:
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on: HarfBuzz
Blocks: RTL-Arabic
  Show dependency treegraph
 
Reported: 2011-07-18 12:51 UTC by BobH
Modified: 2017-10-02 09:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Subtending marks -- works with gedit (50.66 KB, image/jpeg)
2011-07-18 12:51 UTC, BobH
Details
Subtending marks -- fails with Writer (40.55 KB, image/jpeg)
2011-07-18 12:52 UTC, BobH
Details
Subtending marks -- test document (10.35 KB, application/vnd.oasis.opendocument.text)
2011-07-18 12:53 UTC, BobH
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BobH 2011-07-18 12:51:43 UTC
Created attachment 49267 [details]
Subtending marks -- works with gedit

Brief:

With OpenType rendering, only one digit following a subtending mark (U+0600 .. U+0605, or U+06DD) is rendered correctly; 2nd and following digits are rendered normally.

Extended description:

Subtending marks (U+0600 .. U+0605, U+06DD) are typically followed by digits which, assuming appropriate font logic (OpenType, Graphite, etc), are then rendered with small glyphs positioned within (or above or below) the subtending mark. These are rendered correctly by gedit -- see attached "Subtending Marks -- gedit.jpg". 

NB: The font Scheherazade v1.0005 from https://scripts.sil.org/arabicfonts has the OpenType logic for subtending marks U+0600..U+0603 and U+06DD, and was used for this testing.  Any implementation will have limits on the number of digits supported -- Scheherazade supports up to 2, 3, or 4 digits depending on the subtending mark. I've also included writer doc "Subtending Marks.ODT" which contains test data.

LibreOffice 3.4.1 running on Windows appears to depend on Uniscribe for rendering, and works correctly for the digits from the Arabic block (U+0660 .. U+0669 and U+06F0 .. U+06F9) but not for the "Latin" digits (U+0030 .. U+0039). Nothing you can do about this.

However:

Writer from LibreOffice 3.4.1 on UBuntu 11.04 fails to correctly render more than one digit. That is, the first digit after the subtending mark is correct, subsequent digits are not.  See attached "Subtending Marks -- Writer.jpg"

Bob
Comment 1 BobH 2011-07-18 12:52:42 UTC
Created attachment 49268 [details]
Subtending marks -- fails with Writer
Comment 2 BobH 2011-07-18 12:53:12 UTC
Created attachment 49269 [details]
Subtending marks -- test document
Comment 3 Khaled Hosny 2011-12-07 23:15:04 UTC
This looks very suspiciously like a bug in ICU layout engine (which is what LO use on Linux). The only other application using ICU that I've is XeTeX, but there not even the first correct. This even seems to affect only Scheherazade, other fonts like Amiri (http://www.amirifont.org, disclaimer: mine) or even Arabic Typesetting seem to work fine (though both have different limit on the number digits than Scheherazade).
Comment 4 Björn Michaelsen 2011-12-23 12:21:49 UTC Comment hidden (obsolete)
Comment 5 sasha.libreoffice 2012-01-27 10:57:27 UTC
reproduced in LibO 3.6.0 master on Fedora 64 bit
Comment 6 QA Administrators 2015-04-19 03:21:05 UTC Comment hidden (obsolete)
Comment 7 Khaled Hosny 2015-04-19 20:03:20 UTC
This still an issue, and if anyone wants to work in this, it is because GenericSalLayout::ApplyDXArray() is messing with glyph positioning. This code is broken beyond by design and the only way to fix it is by killing it and fixing all use sites to not need it.
Comment 8 BobH 2015-04-20 01:06:16 UTC
Still fails on LO 4.4.2.2

Note that Scheherazade is now at version 2.020 (see http://scripts.sil.org/scheherazade for latest) and the OpenType logic has been improved to be more robust with different rendering systems. However the font now includes Graphite tables and, since the default rendering for LO is with Graphite enabled, one might be fooled into thinking the bug has been fixed.

But the problem is with OpenType logic. To force LO to disable Graphite and thus render Scheherazade with OpenType, run it with environment variable SAL_DISABLE_GRAPHITE=1.
Comment 9 QA Administrators 2016-09-20 09:33:31 UTC Comment hidden (obsolete)
Comment 10 Khaled Hosny 2016-09-21 07:37:11 UTC
Still an issue, should be fixed when bug 89870 is fixed.