Description: If you underline the text for a paragraph with justified Arabic/Persian text, there are situations that rendering of the underline for the text with kashida is incorrect. Steps to Reproduce: 1. Open attachment. All the text should have underline Actual Results: The underline is cut off or rendered out of the correct region Expected Results: The underline should be rendered consistently below all of the text. Reproducible: Always User Profile Reset: No Additional Info: The problem is visible with the latest LO 7.5 dev master: Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 022eafa4d69bc8290aa304b69af2c325fe3d2a02 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Created attachment 183600 [details] Justified Persian text (ODT), all the text is underlined (Wrong rendering) All the text is underlined in this example. The rendering is incorrect because the underline falls out of the text margins.
Created attachment 183601 [details] Justified Persian text (ODT), all the text is underlined (Wrong rendering) This is the PDF output from the above ODT file with the latest LO 7.5 dev master
Created attachment 183602 [details] Justified Persian text (ODT), without underlining below Kashida This example is different from the above ODT/PDF because character with kashida is not underlined. As a result, LibreOffice correctly renders this example file! This difference shows that kashida is the root cause of this problem.
Created attachment 183603 [details] Justified Persian text (PDF), without underlining below Kashida This is the PDF output for the previous example. In this specific situation, the rendering becomes OK. See the above comment.
Created attachment 183604 [details] Justified Persian/English text (ODT), all the text is underlined (wrong rendering) This example is a mix of RTL/LTR text. All the text is underlined, but part of the text is not underlined, which shows incorrect rendering. Just like previous example, If you select the character with kashida and remove underline from it by pressing Ctrl+u, underline for other parts of the word become OK.
Created attachment 183605 [details] Justified Persian/English text (PDF), all the text is underlined (wrong rendering) This is the PDF output from the previous example. The rendering is incorrect, because the underline is shown only partially, while all of the text has the underline style. Please see previous comment.
I can reproduce this bug. Version: 7.4.2.3 / LibreOffice Community Build ID: 40(Build:3) CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: fa-IR (en_US.UTF-8); UI: en-US Ubuntu package version: 1:7.4.2~rc3-0ubuntu0.22.04.1~lo1 Calc: threaded
It would be helpful to find out of this is a regression or not.
Created attachment 183614 [details] Justified Persian/English text (PDF), all the text is underlined (LO 3.5) The problem is reproducible with LO 3.5: LibreOffice 3.5.0rc3 Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Created attachment 183615 [details] Justified Persian/English text (PDF), all the text is underlined (OOo 3.2) Reproducible with OOo 3.2 OpenOffice.org 3.2.1 OOO320m18 (Build: 9502)
(In reply to خالد حسني from comment #8) > It would be helpful to find out of this is a regression or not. With the above outputs from LO 3.5 and OOo 3.2.1, I can say this is not a regression. The situation is a little bit better now, but the main problem is inherited from OpenOffice.org.
(In reply to Hossein from comment #9) > Created attachment 183614 [details] > Justified Persian/English text (PDF), all the text is underlined (LO 3.5) > > The problem is reproducible with LO 3.5: > > LibreOffice 3.5.0rc3 > Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735 This is likely to be a different issue. In the other issue the text width was adding the Kashida width more than once, leading to underline wider than the text, here the width is shorter (it seems to measure the width of the unjustified text), it is also Writer-specific, I can’t reproduce in module that use Edit Engine (e.g. Impress).
(In reply to خالد حسني from comment #12) > (In reply to Hossein from comment #9) > > Created attachment 183614 [details] > > Justified Persian/English text (PDF), all the text is underlined (LO 3.5) > > > > The problem is reproducible with LO 3.5: > > > > LibreOffice 3.5.0rc3 > > Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735 > > This is likely to be a different issue. In the other issue the text width > was adding the Kashida width more than once, leading to underline wider than > the text, here the width is shorter (it seems to measure the width of the > unjustified text), it is also Writer-specific, I can’t reproduce in module > that use Edit Engine (e.g. Impress). Please open a different issue for this one so we can track it.
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/43a5400063b17ed4ba4cbb38bdf5da4a991f60e2 tdf#152048: Fix underline width for Kashida-justified text It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Khaled Hosny committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/be99eda81510a7c3bb5351f3128c83db800fc0f3 tdf#152048: Fix underline width for Kashida-justified text It will be available in 7.5.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to خالد حسني from comment #12) > (In reply to Hossein from comment #9) > > Created attachment 183614 [details] > > Justified Persian/English text (PDF), all the text is underlined (LO 3.5) > > > > The problem is reproducible with LO 3.5: > > > > LibreOffice 3.5.0rc3 > > Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735 > > This is likely to be a different issue. In the other issue the text width > was adding the Kashida width more than once, leading to underline wider than > the text, here the width is shorter (it seems to measure the width of the > unjustified text), it is also Writer-specific, I can’t reproduce in module > that use Edit Engine (e.g. Impress). The remaining problem is filed as tdf#155557.
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/507759b449415e897ac0a1de03e8dd685b1e50fe tdf#152048: Add test It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Khaled Hosny committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4ce43750e7878a813127bdc409d5251369d035f5 tdf#152048: Fix measuring text width with font fallback It will be available in 24.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Khaled Hosny committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/87c8b85c273f285110ea3ae6d6fe99ece279b7b0 tdf#152048: Fix measuring text width with font fallback It will be available in 7.6.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Khaled Hosny committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/34df6c92e513c5f428eff7c9cb1d6b9831eeb323 tdf#152048: Add test It will be available in 7.6.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Khaled Hosny committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/a84bf20b345ba016ab67217f5fd73eebb517dc6b tdf#152048: Fix measuring text width with font fallback It will be available in 7.5.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/8e5534b478efe4f383f214b9ab41fd3383e98296 tdf#156681: Revert "tdf#152048: Fix underline width for Kashida-justified text" It will be available in 7.6.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/7ead6fd72bef4713baf55e786f30b6870cc85609 tdf#156681: Revert "tdf#152048: Fix underline width for Kashida-justified text" It will be available in 7.5.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-7-5-6": https://git.libreoffice.org/core/commit/0b5d67a3514f6b5f183733fa994906b9af47bbfe tdf#156681: Revert "tdf#152048: Fix underline width for Kashida-justified text" It will be available in 7.5.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.