Created attachment 188849 [details] RTL formula Description: The formula is incorrectly displayed as RTL, and the parenthesizes are incorrectly reversed. Steps to Reproduce: 1. Open attachment Actual Results: The formula "f(x)" is incorrectly displayed as RTL, and the parenthesizes are incorrectly reversed and is displayed as "f)x(". Expected Results: The formula should not be displayed as RTL, and the parenthesizes should not be reversed. If you make the paragraph LTR, the formula is displayed correctly. Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 4582cea56eedfe3529fe360c68fc4b95b7d47ac5 CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Created attachment 188850 [details] A set of RTL formulas compared with LTR ones Compare the RTL formulas with the LTR formulas. The RTL formulas are garbled and rendered incorrectly.
The problem is twofold: 1. DOC file open, which leads to the above problem. The problem is not visible in DOCX. 2. When editing the formulas, changing direction should not have any effect (probably other than using localized numerals, if needed).
@Khaled: This can be an interesting piece of font rendering. :-)
Not reproducible in 3.3. Marking as regression. LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4
Bibisected to: commit 6b8c157a0b4f37a09fdbf656919b2df06a3abc3e Date: Thu Mar 4 15:35:44 2021 +0100 make RenderMaskPrimitive2DPixel() clip using clipping (tdf#140797) But I think it just changes the conditions that expose this bug. If I revert this commit, the issue is fixed unless the UI is RTL, then the issue shows up again. It is even worse with RTL UI, since the equation is always broken regardless of the paragraph direction. So I don't think it is a regression per se. 4.3 looks good with RTL UI, bibisecting again.
Bivisected with RTL UI to a271321ab7d66eab007f998237e7fb09dd5c9bf7, but this makes little sense and reverting this commit makes no difference.
FWIW, the formula is not imported as a Math formula, but as a vector image, so Formula Editor is probably not involved at all here.