Bug 166497 - Test document with RTL+LTR text looks different and causes unit test failure
Summary: Test document with RTL+LTR text looks different and causes unit test failure
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: Dev-Bugs RTL
  Show dependency treegraph
 
Reported: 2025-05-08 11:08 UTC by Aron Budea
Modified: 2025-05-08 11:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot in Writer (45.87 KB, image/png)
2025-05-08 11:08 UTC, Aron Budea
Details
tdf162314.fodt (12.59 KB, application/vnd.oasis.opendocument.text)
2025-05-08 11:09 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-05-08 11:08:37 UTC
Created attachment 200701 [details]
Screenshot in Writer

I noticed the following unit test failure (the test was added for bug 162314) in my LO build on Windows:

test/source/xmltesttools.cxx:169:`anonymous namespace'::TestTdf162314::TestBody
equality assertion failed
- Expected: Aa aa aaaa ﷽
- Actual  : Aa aa aaaa ﷽ aaaa
- In <>, attribute 'portion' of '/root/page/body/txt/SwParaPortion/SwLineLayout[1]' incorrect value.

When opening sw\qa\extras\layout\data\tdf162314.fodt from the build, which as the same as attachment 195665 [details], just using Noto Sans Arabic (this matters) and in FODT format, the Arabic text is shown compacted into two lines, but the whole RTL+LTR text is within a single line. This doesn't conform the original, where the Arabic text wasn't split into two lines, and part of the LTR text is moved to the 2nd line.
See attached screenshot.

This started from the following change in 25.2:
https://git.libreoffice.org/core/commit/e6282cff7857999b031bb847a6ca8d996a090db1
author		Michael Stahl <michael.stahl@allotropia.de>	Fri Aug 02 12:48:05 2024 +0200
committer	Michael Stahl <michael.stahl@allotropia.de>	Mon Aug 12 12:18:25 2024 +0200

more_fonts: ship "hinted" instead of "full" for "Noto Sans Arabic"
Comment 1 Aron Budea 2025-05-08 11:09:54 UTC
Created attachment 200702 [details]
tdf162314.fodt
Comment 2 Hossein 2025-05-08 11:14:36 UTC
I think this can be an issue with the font version that is used, and not actually a bug. Could you please check to see if you have an another font with the same name, but with other (probably older) version installed?
Comment 3 Aron Budea 2025-05-08 11:46:50 UTC
Indeed, I had an old version of the font installed, after installing the one coming with LibreOffice, the unit test passes. Thanks for the hint, Hossein!