[upstream] Rotated Arabic text is displaced in PDF when substitute glyphs are used

Bug #1774244 reported by Miikka-Markus Alhonen
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Confirmed
Medium
libreoffice (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

In this example, I created a document with a few Arabic-script characters (U+08A2, U+08A3 & U+08A4), which were quite recently added to Unicode for various Arabic-script African languages such as Fulfulde. The font I had used in the rest of the document was DejaVu Sans, so I used that font setting even for these characters. In reality, these glyphs are not found in DejaVu Sans but had to be substituted from another font, in my case Scheherazade (from fonts-sil-scheherazade, available through packages.sil.org). After rotating the letters by 90 degrees, everything looked fine on the screen but when I created a PDF, everything was displaced about one inch upwards and one inch to the left. See the attached screenshot, where everything looks fine, and the PDF where all the letters are displaced.

If I change the font setting for this text to Scheherazade, everything looks fine even in a generated PDF. So apparently LibreOffice gets confused by the different font metrics of the two fonts, the one selected by the user and the one used as the real source for the glyphs.

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: Wed May 30 17:36:37 2018
InstallationDate: Installed on 2017-02-13 (471 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 (205 days ago)

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

Here's a screenshot where everything looks fine, unlike the PDF.

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

This is the ODT document used to create both the PDF and the screenshot.

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

Sorry, for some reason, my browser seems to have submitted the same bug report twice, as #1774243 and #1774244. All the relevant information, including all the attachments are posted in this report, so I marked the other report as a duplicate.

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

Sorry for the lack of feedback until now, Miikka.
I can reliably reproduce the issue with libreoffice 6.0.3.2 on Ubuntu 18.04 and libreoffice 6.1.0.3 installed as a snap.

At a first glance this looks like an upstream issue to me. Would you mind filing a 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!

Olivier Tilloy (osomon)
Changed in libreoffice (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Miikka-Markus Alhonen (malhonen) wrote :

Description:
In this example, I created a document with a few Arabic-script characters (U+08A2, U+08A3 & U+08A4), which were quite recently added to Unicode for various Arabic-script African languages such as Fulfulde. The font I had used in the rest of the document was DejaVu Sans, so I used that font setting even for these characters. In reality, these glyphs are not found in DejaVu Sans but had to be substituted from another font, in my case Scheherazade (from fonts-sil-scheherazade, available through packages.sil.org). After rotating the letters by 90 degrees, everything looked fine on the screen but when I created a PDF, everything was displaced about one inch upwards and one inch to the left. See the attached screenshot, where everything looks fine, and the PDF where all the letters are displaced.

If I change the font setting for this text to Scheherazade, everything looks fine even in a generated PDF. So apparently LibreOffice gets confused by the different font metrics of the two fonts, the one selected by the user and the one used as the real source for the glyphs.

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/1774244 . 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 and 6.1.0.3 on Ubuntu 18.04, as well.

Steps to Reproduce:
1. In a new Writer document, type Arabic characters that are not present in the default font (in my example "ࢢࢣࢤ").
2. Select the text and rotate it by 90 degrees through the Font properties dialog.
3. Generate a PDF.

Actual Results:
In the generated PDF, the text is displaced one inch to the left and one inch upwards. In Writer everything looks fine.

Expected Results:
The generated PDF should look the same as the document view in Writer.

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 144267
PDF with displaced Arabic text

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

Created attachment 144268
Screenshot of Writer document view

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

Created attachment 144269
ODT document used to create the screenshot and the PDF

Revision history for this message
Miikka-Markus Alhonen (malhonen) wrote :
Changed in libreoffice (Ubuntu):
importance: Undecided → Low
Revision history for this message
In , Beluga (beluga) wrote :

Repro.

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

Arch Linux 64-bit
LibreOffice 3.3.0
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4

Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Confirmed
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

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

Still reproducible on:

Version: 6.3.2.2
Build ID: libreoffice-6.3.2.2-snap1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded

summary: - Rotated Arabic text is displaced in PDF when substitute glyphs are used
+ [upstream] Rotated Arabic text is displaced in PDF when substitute
+ glyphs are used
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 :

This particular problem seems to have been resolved on LO 7.3.0.3 on Windows 10. Rotating these and other Arabic-script characters does not work as expected (sometimes the text won't rotate at all or if it does, the letters are in reversed order) but these seem to be separate issues.

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 , Miikka-Markus Alhonen (malhonen) wrote :

Sorry, I take back my word. It's still the same issue in RTL paragraphs on LO 7.3.0.3. Writing my previous comment, I had only tested LTR paragraphs, which had other issues. RTL paragraphs still displace the text one inch to the left and up.

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

FWIW, this seems to be related to font fallback. If the selected font supports Arabic, the text is exported correctly.

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

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

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

Bug 124713 has an example not involving Arabic text at all. It seems to depend entirely on the fact that a fallback font is used or not.

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

Still repro on:

Version: 7.6.6.3 (X86_64) / LibreOffice Community
Build ID: 60(Build:3)
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: fi-FI
Ubuntu package version: 4:7.6.6-0ubuntu0.23.10.1
Calc: threaded

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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