Description: Wenn typing a document in Arabic in LO Writer, I realised that the rendering was not correct. This happens both in displaying the text and in printing. The letters RA (ر) and YA (ي),often are sticked together with the previous letters without keeping the right distance ore even are superposed to the preceding letter. The text can still be read, but in my opinion this bug makes LibreOffice unusable for professional Arabic texts. I cutted and pasted the same text in LO Impress getting the same result. When I did it in Google Docs, everything was correct. For me this is an Arabic text rendering bug from Libre Office in general. Steps to Reproduce: 1. Type or paste a text in Arabic using LO Writer or LO Impress. 2. Look at the text on the screen. 3. Look at the printed text. Actual Results: Both texts renderings (screen and print) are WRONG. They are readable, but look ugly and not professional. Expected Results: Proper Arabic text rendering. Reproducible: Always User Profile Reset: No Additional Info: I made screenshots. I will attach them to the bug when it is filled.
Created attachment 197583 [details] Screenshot showing wrong Arabic text rendering on screen
Created attachment 197584 [details] LO Writer Arabic text file in order to simplify bug replication
Created attachment 197585 [details] Output of rendering Arabic and Persian yah from pango-view utility > The text can still be read, but in my opinion this bug makes LibreOffice unusable for professional Arabic texts. The problem here is with two things: 1. Incorrect text language: the language set for the text is incorrectly set to "Hindi". You can change that by going to "Character" and then setting "Arabic (...)" in "Complex" section. You need to activate "Complex text layout" and set it to "Arabic (...)" in "Tools > Options > Languages and Locales > General". 2. Fallback font: You have not set an appropriate Arabic font for the text. You can use "Amiri" for example. Other than that, I think even with a fallback font, shaping algorithm should work correctly. The fallback font here is "FreeSerif", and the digits font is "Lohit Devanagari", because of the incorrect language, Hindi set for the text. You can see the incorrect type of the digits for Arabic text. The problem seems to be from the font itself. You can see how the underlying HarfBuzz library renders the text: $ pango-view --font="FreeSerif 100" --text 'في' On the other hand, with Persian ی it is rendered correctly: $ pango-view --font="FreeSerif 100" --text 'فی' I think this is a font problem. FreeSerif font is provided by "GNU FreeFont", and you can see the related bug here: bug #65979: Arabic Alif Maqsura, Kaf and Lam Alif problems https://savannah.gnu.org/bugs/?65979