Bug 119347 - VIEWING: Font metrics (Scheherazade) mixed up when selecting Arabic characters in Writer
Summary: VIEWING: Font metrics (Scheherazade) mixed up when selecting Arabic character...
Status: RESOLVED DUPLICATE of bug 30731
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.6.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-18 15:28 UTC by vaaydayaasra
Modified: 2022-10-02 10:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of Writer document view which displays incorrect behavior (100.20 KB, image/png)
2018-08-18 15:29 UTC, vaaydayaasra
Details
Screenshot of Calc which shows correct behavior (97.03 KB, image/png)
2018-08-18 15:30 UTC, vaaydayaasra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vaaydayaasra 2018-08-18 15:28:52 UTC
Description:
In most fonts, many characters in the Arabic script change their width and height as typing progresses. For example the letter ب (U+0628) is reduced to about a half or even a third of its width if it's followed by another character such as ا (U+0627): با. Usually LibreOffice understands the changes in font metrics pretty well but not always.

See the attached screenshot where I've written the sentence "مرحبا يا صديقي العزيز" in Writer and started selecting letters from the beginning of the line. The selection shown in the screenshot looks like the whole first word plus the following space but actually it only covers the first 4 letters of the first word out of 5 total: مرحب. From a user's point of view, this is very confusing, as I can't tell how far I've already selected without counting the characters in my mind. Even more surprisingly, LibreOffice Calc shows the selection as expected, i.e. different from Writer, so this does not feel like a font problem per se, although only some fonts display this behavior.

The font I'm using in this example is Scheherazade, available through a third-party repository at packages.sil.org (Debian package fonts-sil-scheherazade). The font is designed to cover a very wide variety of characters used for Arabic-script minority languages in both Asia and Africa, and in many cases it's the only professionally made font available for people working on many of these languages.

This bug was first reported on Launchpad for LO 5.4.6.2 on Ubuntu 17.10 at: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1772520 . After my initial report, I have upgraded to LO 6.0.3.2 and can still reproduce the problem. Another user on Launchpad confirmed the bug on LO 6.0.3.2, as well.

Steps to Reproduce:
1. In a new Writer document, change font to Scheherazade and paragraph directionality to RTL.
2. Type مرحبا يا صديقي العزيز
3. Go to the beginning of the line (extreme right as this is a RTL language) and select 4 characters by pressing Shift+Left four times.

Actual Results:
On screen, it looks like you have selected the whole first word and the following space (altogether 6 characters). In reality, only the first 4 characters have been selected.

Expected Results:
Visually, only 4 characters should appear selected.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.0.3.2
Build ID: 1:6.0.3-0ubuntu1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 1 vaaydayaasra 2018-08-18 15:29:59 UTC
Created attachment 144270 [details]
Screenshot of Writer document view which displays incorrect behavior
Comment 2 vaaydayaasra 2018-08-18 15:30:54 UTC
Created attachment 144271 [details]
Screenshot of Calc which shows correct behavior
Comment 3 Buovjaga 2018-09-10 17:00:24 UTC
Repro with Scheherazade font. Freesans is fine.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 033a68c49fe2b8aa397832d92d400eb0259ea809
CPU threads: 8; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); Calc: threaded
Built on September 5th 2018
Comment 4 QA Administrators 2019-09-11 04:37:58 UTC Comment hidden (noise)
Comment 5 vaaydayaasra 2019-09-12 12:39:29 UTC
Still reproducible on:

Version: 6.3.1.2 (x64)
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
Threads CPU : 4; OS : Windows 6.3; UI Render : par défaut; VCL: win; 
Locale : fr-FR (fr_FR); Langue IHM : fr-FR
Calc: threaded
Comment 6 QA Administrators 2021-09-12 03:48:32 UTC Comment hidden (noise)
Comment 7 vaaydayaasra 2022-03-01 18:43:21 UTC
Reproducible on:

Version: 7.3.0.3 (x64) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL
Comment 8 ⁨خالد حسني⁩ 2022-10-02 10:08:09 UTC
Same underling issue as bug 30731, and fixed with the same fix.

*** This bug has been marked as a duplicate of bug 30731 ***