[upstream] Font metrics mixed up when selecting Arabic characters in Writer

Bug #1772520 reported by Miikka-Markus Alhonen
6
This bug affects 1 person
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-0ubuntu0.17.10.1
  Candidate: 1:5.4.6-0ubuntu0.17.10.1
  Version table:
 *** 1:5.4.6-0ubuntu0.17.10.1 500
        500 http://mr.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1:5.4.5-0ubuntu0.17.10.5 500
        500 http://security.ubuntu.com/ubuntu artful-security/main amd64 Packages
     1:5.4.1-0ubuntu1 500
        500 http://mr.archive.ubuntu.com/ubuntu artful/main amd64 Packages

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: libreoffice-writer 1:5.4.6-0ubuntu0.17.10.1
ProcVersionSignature: Ubuntu 4.13.0-41.46-generic 4.13.16
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-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
SourcePackage: libreoffice
UpgradeStatus: Upgraded to artful on 2017-11-05 (197 days ago)

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

Steps to reproduce the problem:
1- Install Linux Libertine G font from here: http://numbertext.org/linux/
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.

Revision history for this message
In , mhosken (martin-hosken) wrote :

This bug exemplifies a couple of problems.

Bug 34420 addresses most of the needs here. But there is also something wrong with the font. When creating ligatures it is necessary to associate the ligature with all (well the first and last) of the underlying glyphs. Thus a rule (taken from MagyarLinLibertineG) like:

unicode(0x005C) p("a") p("l") p("p") p("h") p("a") > _ _ _ _ _ unicode(0x03B1);

needs to become:

unicode(0x005C) p("a") p("l") p("p") p("h") p("a") > _ _ _ _ _ unicode(0x03B1):(1 6);

This then tells the engine that the whole string \alpha is associated with the one output glyph rather than saying that it is deleting \alph and associating the alpha with the final a only.

Bug 34420 removes the most egregious problems with not specifying appropriately, but doesn't solve everything.

In addition there is the issue that people don't really want to have to right arrow 6 times to get past the alpha, which the current cursor tracking algorithm, which is based on a purely codepoint based (UAX#29) model, requires.

Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

Modified Version due to report date.

@RGB:
Still a problem for you?

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

(In reply to comment #2)
> @RGB:
> Still a problem for you?

Yes. Same behavior as described on initial entry with LibO 3.4.2.

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

The problem is present on 3.5 beta2.

Revision history for this message
In , mhosken (martin-hosken) wrote :

did you fix the font?

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

Please read this message in its entirety before responding.

Your bug was confirmed at least 1 year ago and has not had any activity on it for over a year. Your bug is still set to NEW which means that it is open and confirmed. It would be nice to have the bug confirmed on a newer version than the version reported in the original report to know that the bug is still present -- sometimes a bug is inadvertently fixed over time and just never closed.

If you have time please do the following:
1) Test to see if the bug is still present on a currently supported version of LibreOffice (preferably 4.2 or newer).
2) If it is present please leave a comment telling us what version of LibreOffice and your operating system.
3) If it is NOT present please set the bug to RESOLVED-WORKSFORME and leave a short comment telling us your version and Operating System

Please DO NOT
1) Update the version field
2) Reply via email (please reply directly on the bug tracker)
3) Set the bug to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link:
https://wiki.documentfoundation.org/QA/BugTriage

There are also other ways to get involved including with marketing, UX, documentation, and of course developing - http://www.libreoffice.org/get-help/mailing-lists/.

Lastly, good bug reports help tremendously in making the process go smoother, please always provide reproducible steps (even if it seems easy) and attach any and all relevant material

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

I have verified this issue on:
Ubuntu 14.04 x64
LibreOffice 4.3.4.1 release

Changing priority according to flowchart: https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg

Minor - can slow down professional quality work but won't prevent it.
Lowest - seems like this is really a corner case issue and the workaround is pretty straight forward (just push left a few more times).

@RGB - thanks for reporting and for your patience and understanding. Our team is powered by a group of volunteers who are giving thousands of hours at no cost to make LibreOffice better for everyone.

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

   Test to see if the bug is still present on a currently supported version of LibreOffice
   (5.0.5 or 5.1.0) https://www.libreoffice.org/download/

   If the bug is present, please leave a comment that includes the version of LibreOffice and
   your operating system, and any changes you see in the bug behavior

   If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave
   a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

   Update the version field
   Reply via email (please reply directly on the bug tracker)
   Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
   appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2016-02-21

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

On 5.1 the behaviour is different, but still not correct. Now, when by pressing the cursor arrow to the left you arrive to the "prime" character, the cursor remains on its position for six strokes before jumping to the other side, which is a bit confusing too.

Try writing, on the same conditions as before (with textm=1) the following text

Text \prime more text \alpha and final text

and try to move the cursor one position at a time from the right. Now there is a confusing behaviour not only on the prime and alpha characters, but on the word "final" with the cursor remaining for two strokes on the "n" and then jumping the "fi" ligature on one step.

Tested on vanilla LibO 5.1.0.3 (64 bits) under openSUSE 13.2.

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

Created attachment 122845
Short screencast

This is a short screencast that show the behaviour on LibO 5.1 (file is a mp4 video)

Revision history for this message
In , mhosken (martin-hosken) wrote :

If my understanding of the internals of libo are correct, the cursor behaviour is not based on font rendering but on Unicode character properties. Thus, although graphite is being used to turn a long string of letters into a single glyph, the cursor movement is based purely on the underlying characters. This would happen whether the font were Graphite or OT based.

The key code seems to be in SwContentNode::GoNext (sw/core/docnode/node.cxx) and uses an ICU break iterator to control the cursor movement.

Basically, this isn't a graphite or graphite integration bug.

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice
(5.2.5 or 5.3.0 https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and
your operating system, and any changes you see in the bug behavior

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave
a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug-20170306

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

Created attachment 131682
Screencast updated to LibO 5.3

Still present on 5.3. The behaviour is a bit different than what's shown on the previous screencast (now it's back to the originally reported behaviour), so I updated it.

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

Problem still present 6.0.4.2. The behaviour can be seen not only with Graphite fonts, but with OpenType ones too. If you take a font with "alternate fractions", for example, like Sukhumala(1) and set the font as

Sukhumala:afrc

for the text "1/2" you'll see exactly the same behaviour when moving the cursor from right to left towards the fraction.

------
(1) http://www.softerviews.org/Fonts.html#Sukhumala

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

Screenshot of selecting the same characters in Calc, which shows the expected behavior.

Revision history for this message
Olivier Tilloy (osomon) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

@Miikka-Markus, would you mind confirming that upstream bug, if you think that matches/includes your issue?

Revision history for this message
Olivier Tilloy (osomon) wrote :

I can reliably reproduce the issue in a bionic VM with libreoffice 6.0.3.2. The font package is fonts-sil-scheherazade. Only writer is affected, the selection behaves as expected in calc.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Miikka-Markus Alhonen (malhonen) wrote :

@Olivier, no, the upstream bug you mentioned is different. In the example I posted, there are no diacritics (problem number 1 in the upstream report), and visually the text looks fine with no undesirable kerning or spaces (problem number 3 in the report). It's just selection which misbehaves; the rendering of the text looks good.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Sorry for the lack of feedback until now, Miikka.

Would you mind filing a new bug report at https://bugs.documentfoundation.org/enter_bug.cgi?product=LibreOffice&format=guided and linking to it here so we can track its resolution? Thanks!

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

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

Created attachment 144270
Screenshot of Writer document view which displays incorrect behavior

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

Created attachment 144271
Screenshot of Calc which shows correct behavior

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

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

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

Dear RGB,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

Problem still present on 6.2.3.2. Comment 17 is still valid.

Revision history for this message
In , mhosken (martin-hosken) wrote :

Almost certainly will never be fixed.

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

Dear vaaydayaasra,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Miikka-Markus Alhonen (malhonen) wrote :

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

summary: - Font metrics mixed up when selecting Arabic characters in Writer
+ [upstream] Font metrics mixed up when selecting Arabic characters in
+ Writer
Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

Dear RGB,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

Revision history for this message
In , Rgb-mldc (rgb-mldc) wrote :

Problem still present on 7.1.3.2. Comment 17 is still valid.

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

Dear vaaydayaasra,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

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

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

Revision history for this message
In , Khaled-n (khaled-n) wrote :

Created attachment 182033
Screencast comparing the cursor movement of ligated with unligated text

I believe the problem is that LibreOffice (or writer) is measuring the text width in chunks to determine the cursor position, e.g. in the string “office” for the cursor at “o|ffice” it will measure the width of “o” to position the cursor, and in “of|fice” it will measure the width of “of” and so on. For ligatures where the width of the partial text is close enough to the with of the ligature component, things appear to work, but in the problematic cases here the difference is way off that the cursor appears to be jumping.

See the cursor movement in the attached screencast and compare the cursor position when it jumps with the unligated text below it, the cursor jumps to exactly where the unligated glyph is.

Revision history for this message
In , Khaled-n (khaled-n) wrote :

(In reply to خالد حسني from comment #23)
> Created attachment 182033 [details]
> Screencast comparing the cursor movement of ligated with unligated text
>
> I believe the problem is that LibreOffice (or writer) is measuring the text
> width in chunks to determine the cursor position, e.g. in the string
> “office” for the cursor at “o|ffice” it will measure the width of “o” to
> position the cursor, and in “of|fice” it will measure the width of “of” and
> so on. For ligatures where the width of the partial text is close enough to
> the with of the ligature component, things appear to work, but in the
> problematic cases here the difference is way off that the cursor appears to
> be jumping.
>
> See the cursor movement in the attached screencast and compare the cursor
> position when it jumps with the unligated text below it, the cursor jumps to
> exactly where the unligated glyph is.

I can confirm this is exactly what is happening, and here a quick patch:
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 146122841e7c..8389c39f54e3 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1608,8 +1608,9 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
         if( !GetScrFont()->IsSameInstance( rInf.GetOut().GetFont() ) )
             rInf.GetOut().SetFont( *m_pScrFont );

+ sal_Int32 nLength(rInf.GetText().getLength() - sal_Int32(rInf.GetIdx()));
         GetTextArray(*m_pPrinter, rInf.GetText(), aKernArray,
- sal_Int32(rInf.GetIdx()), sal_Int32(nLn));
+ sal_Int32(rInf.GetIdx()), nLength);
     }
     else
     {

With this patch, the cursor no longer jumps, but it won’t “enter” the ligature either (i.e. it will remain at the end of the ligature for the number of letters in the ligature). We can improve this, but I’m not sure what this code is used also for and this change is certainly wrong in other situations.

Now I need someone who is familiar with these parts of Writer to guide me in untangling all of this.

Revision history for this message
In , Khaled-n (khaled-n) wrote :
Revision history for this message
In , Khaled-n (khaled-n) wrote :

Created attachment 182087
Screencast of cursor movement with my patches applied

Here is the current status:
1. Ligatures are detected and the width of the glyph is evenly distributed over the number of grapheme clusters that make up the ligature. This works nicely for “real” ligatures, but a bit awkward for Linux Libertine G’s text replacement disguised as ligatures. But we can’t distinguish between the two, and we want this behavior for most ligatures.
2. If the font has OpenType ligature caret information, we will use it for more fine grained caret placement inside the ligature.

Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8cb4db941f91cc234dd18c61f8b1e51f65360d1f

tdf#30731: Improve caret travelling in Writer

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

Revision history for this message
In , Libreoffice-commits (libreoffice-commits) wrote :

Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bdbbdc9b931d35f6d7d816512ac5be599295dc80

tdf#30731: Use ligature caret positions from the font

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.

Revision history for this message
In , Khaled-n (khaled-n) wrote :

Same underling issue as bug 30731, and fixed with the same fix.

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

Revision history for this message
In , Khaled-n (khaled-n) wrote :

*** Bug 119347 has been marked as a duplicate of this bug. ***

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.