Bug 85426 - VIEWING: Fixing line space crops Arabic tashkeel below in Amiri font
Summary: VIEWING: Fixing line space crops Arabic tashkeel below in Amiri font
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 113102 (view as bug list)
Depends on:
Blocks: Paragraph-Line-Spacing RTL-Arabic-and-Farsi
  Show dependency treegraph
 
Reported: 2014-10-25 04:20 UTC by Ghasan
Modified: 2023-12-14 09:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparison between LibreOffice rendering and PDF. (12.54 KB, application/zip)
2014-10-25 04:20 UTC, Ghasan
Details
Original files (15.34 KB, application/zip)
2014-10-25 05:54 UTC, Ghasan
Details
PDF output in 4.3.2.2 (8.32 KB, application/pdf)
2014-10-25 07:10 UTC, tommy27
Details
Word 2013 Output (14.11 KB, image/jpeg)
2015-12-24 18:30 UTC, Ghasan
Details
Same text and font in Google Chrome (61.27 KB, image/png)
2017-10-13 19:38 UTC, ⁨خالد حسني⁩
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ghasan 2014-10-25 04:20:14 UTC
Created attachment 108378 [details]
Comparison between LibreOffice rendering and PDF.

It is just as the summary.

I am using Amiri font for writing RTL text.
Comment 1 tommy27 2014-10-25 05:40:45 UTC
please upload the original .odt file as well, not only screenshots.
Comment 2 Ghasan 2014-10-25 05:54:56 UTC
Created attachment 108379 [details]
Original files

Here are the original files. BTW, I noticed also some glitches when navigating letters. For example, I can't navigate to the start of the second line, and would need to advance to three of four letters in case I want to delete the first letter in the second line. I think this is logical vs visual issue.
Comment 3 tommy27 2014-10-25 07:10:11 UTC
Created attachment 108382 [details]
PDF output in 4.3.2.2

try upgrading to LibO 4.3.2.2 and export your .doc file to PDF
compare with my attached PDF

it seems much better than your PDF output in 4.2.6.3.
do you agree or do you still see PDF export issues?
Comment 4 Ghasan 2014-10-25 08:02:06 UTC
I downloaded the latest 4.3 and no longer facing the issue of navigating letters I mentioned in my second comment. However, the view is still the same.

In the PDF I attached you can see the diacritics of the first line (below إ letters), however they are not visible when working on LibreOffice.
Comment 5 Ghasan 2014-11-04 10:54:42 UTC
I found this question on Superuser.com, and it seems similar to my case.
https://superuser.com/questions/776047/arabic-in-libreoffice-composite-character-chopped-off-at-the-top
Comment 6 tommy27 2014-11-05 07:02:07 UTC
Ok, I set status to NEW because of that website confirmation
Comment 7 QA Administrators 2015-12-20 16:12:16 UTC Comment hidden (obsolete)
Comment 8 Ghasan 2015-12-24 18:30:43 UTC
Created attachment 121537 [details]
Word 2013 Output

It looks like either an issue with the font, or that the font is supporting advanced OpenType features that is not widely used (I have heard once about its use of various use of OpenType.)

The issue manifests also with Word 2013. The issue as my obeservation is that when I fix the height of the line and they ended overlapping when they span multiple lines, the "overflow" content (especially when using diacritics) of each line is cut short. However, when it is printed, PDF seems to let them overlap without interference.
Comment 9 QA Administrators 2017-01-03 19:57:41 UTC Comment hidden (obsolete)
Comment 10 Yousuf Philips (jay) (retired) 2017-10-13 17:45:43 UTC
So this happens in Amiri (v0.107-1 on my ubuntu 16.04-based system and v0.109 from github), but doesnt in any arabic font that comes by default on Windows, so i presume its a problem with the font. I field a separate bug for the issue mentioned in comment 5 in bug 113102.

Khaled: What is your take on this, as you are the font creator?
Comment 11 ⁨خالد حسني⁩ 2017-10-13 19:17:39 UTC
That is another clipping issue, we are clipping the text to the line height not to the bounding box as we should. This is triggered with Amiri since its vowel marks are generally high than simpler fonts, but the PDF renders fine since it does not suffer from the same clipping limitations that LibreOffice own rendering has.
Comment 12 ⁨خالد حسني⁩ 2017-10-13 19:37:19 UTC
MS Office has the same clipping issues as LibreOffice. Compare with web browsers (e.g. Firefox or Chrome) that have no issue:

data:text/html;charset=utf8,<p style="font: 20pt/170% Amiri; width: 800px; direction:rtl;word-break: break-all;">إإٍإٍإٍإٍإٍإٍإٍإٍإٍإٍإٍإٍإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإإأأأأأًأًأًأًأًأًأًأًأًأًأًأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأأ.</p>
Comment 13 ⁨خالد حسني⁩ 2017-10-13 19:38:48 UTC
Created attachment 136962 [details]
Same text and font in Google Chrome
Comment 14 QA Administrators 2018-10-14 02:57:11 UTC Comment hidden (obsolete)
Comment 15 QA Administrators 2020-10-14 04:30:57 UTC Comment hidden (obsolete)
Comment 16 Kamil Landa 2022-08-16 16:17:42 UTC
*** Bug 150439 has been marked as a duplicate of this bug. ***
Comment 17 Kamil Landa 2022-08-16 16:19:09 UTC
*** Bug 113102 has been marked as a duplicate of this bug. ***
Comment 18 ⁨خالد حسني⁩ 2022-08-17 00:48:56 UTC
I think this is a clipping issue.

Ideally applications should be using the clipping font metrics to determine the height and depth of the clipping region (AKA OS/2 usWinAscent/usWinDescent https://docs.microsoft.com/en-us/typography/opentype/spec/os2#uswinascent), but it seems that LO is (sometimes?) using line spacing instead.
Comment 19 Sophie Sipasseuth 2023-12-14 09:39:18 UTC
Repro, the display of the pdf and the odt files in LibreOffice is not correct compared to what is expected:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: bfbae5ddd52cf80af94b250b9de349f0340dbe34
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: threaded