[upstream] Font metrics mixed up when selecting Arabic characters in Writer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LibreOffice |
Fix Released
|
Low
|
|||
libreoffice (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug 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. 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.
Description: Ubuntu 17.10
Release: 17.10
libreoffice-writer:
Installed: 1:5.4.6-
Candidate: 1:5.4.6-
Version table:
*** 1:5.4.6-
500 http://
100 /var/lib/
1:
500 http://
1:
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: libreoffice-writer 1:5.4.6-
ProcVersionSign
Uname: Linux 4.13.0-41-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.8
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon May 21 21:03:43 2018
InstallationDate: Installed on 2017-02-13 (462 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=fi_FI.UTF-8
SHELL=/bin/bash
SourcePackage: libreoffice
UpgradeStatus: Upgraded to artful on 2017-11-05 (197 days ago)
Changed in df-libreoffice: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
summary: |
- Font metrics mixed up when selecting Arabic characters in Writer + [upstream] Font metrics mixed up when selecting Arabic characters in + Writer |
Changed in df-libreoffice: | |
status: | Confirmed → Invalid |
Changed in df-libreoffice: | |
importance: | Medium → Unknown |
status: | Invalid → Unknown |
Changed in df-libreoffice: | |
importance: | Unknown → Low |
status: | Unknown → Fix Released |
Steps to reproduce the problem: numbertext. org/linux/
1- Install Linux Libertine G font from here: http://
2- Open a Writer document and type the following text
Some text \prime Some text fi more text
3- Modify the paragraph style to use the Linux Libertine G font with "tex mode" enablesd (on the font name box type: Linux Libertine G:texm=1)
"\prime" will change into ' and fi will be replaced with proper typographical ligature.
4- Put the cursor on the end of the paragraph and use the cursor arrows to go to the left one character at a time.
Actual result:
While the cursor behaviour is OK on the fi ligature (and this is an improvement respect OOo 3.2.x), when you arrive to the "prime" the cursor will jump to the right, possible going to the position where the text \prime should be if "tex mode" were not enabled.
This behaviour is confusing because the cursor jump to a text position, but if you press "back space" the text deleted is the one "hidden" by the Graphite replacement, not the one where cursor is shown.