Comment 9 for bug 1772520

Revision history for this message
In , Miikka-Markus Alhonen (malhonen) wrote :

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