Bug 103103 - Many Arabic fonts dont render correctly on Linux
Summary: Many Arabic fonts dont render correctly on Linux
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.2.1.2 release
Hardware: All Linux (All)
: high major
Assignee: Khaled Hosny
QA Contact:
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords: bibisected, bisected, regression
Depends on: HarfBuzz
Blocks: Font-Rendering RTL-Arabic
  Show dependency treegraph
 
Reported: 2016-10-11 01:49 UTC by Yousuf Philips (jay)
Modified: 2017-10-02 08:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
5.3 vs 5.1 (119.69 KB, image/png)
2016-10-11 01:49 UTC, Yousuf Philips (jay)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) 2016-10-11 01:49:37 UTC
Created attachment 127940 [details]
5.3 vs 5.1

Sometime in the 5.2 lifecycle arabic fonts have broken on Linux. This doesnt happen on Windows. Firstly they dont render correctly and black bars appear in various places and secondly they are being placed outside of the selected region, which has the beginning of the first word appear outside of the table border.

The document i was using in the screenshot can be downloaded from there - https://drive.google.com/open?id=0B6qJrVIa0SAlM0poTEN4eElIS3M

Version: 5.3.0.0.alpha0+
Build ID: f309531cfe1d6a1b6ea1306d45ed3e121145bc5f
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-04_03:52:18
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Khaled Hosny 2016-10-11 10:29:15 UTC
That is seriously broken, those bars looks like those bars are randomly inserted kashidas. Also mark positions are completely off.

However, I can’t reproduce this with 5.2, but I can reproduce it on master.

But it seems to be fixed with bug 89870, but I think we still need to bibisect this.
Comment 2 Aron Budea 2016-10-11 11:24:57 UTC
This got broken in two steps, first the black bars appeared and the text got displaced, then later the positions of symbols on top changed.

Here is the first one. Need to update bibisect repo for the other.
Khaled, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=6323e6628668849438e6e19ba7ad2c6598263261

"Fix not-so-newly introduced perf regression in vcl
Reverts f688acfdae00ebdd891737e533d54368810185e1 and the cluster
boundaries part of 1da9b4c24e806ad2447b4a656e2a7192755bb6a8, checking
the user of the GlyphItem::IS_IN_CLUSTER flag again, I think the old
code provides what they expect.

Change-Id: I47d279837af963a6db74ebd0019dcef83d98ae7a"

451c61ab9977db40cdd45b10ed3917fc716384da is the first bad commit
commit 451c61ab9977db40cdd45b10ed3917fc716384da
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Sep 12 12:08:29 2016 +0200

    source sha:6323e6628668849438e6e19ba7ad2c6598263261
    
    source sha:6323e6628668849438e6e19ba7ad2c6598263261

# bad: [4407a23f278bbf4c8031f85563844430c43dfd7e] source sha:e5981249db34db2367bae2a2f3e7e8d9f8bd09a0
# good: [09613c3ea582c72cd064e1627766e3e96c196ebf] source sha:5b168b3fa568e48e795234dc5fa454bf24c9805e
git bisect start '4407a23f278bbf4c8031f85563844430c43dfd7e' '09613c3ea582c72cd064e1627766e3e96c196ebf'
# good: [7c0cd7c913557bac842bf0fa03ae9d84e8c9e605] source sha:c4cb83504faa1d241a116001fd27f7148de300ba
git bisect good 7c0cd7c913557bac842bf0fa03ae9d84e8c9e605
# good: [6903a058b7ade2a47c6c308e5cf42880cfc6f9cd] source sha:45f42681f4d1260c42140a313560534e605f81a4
git bisect good 6903a058b7ade2a47c6c308e5cf42880cfc6f9cd
# good: [60d83aebbac007b8748a14555e8b0c6d151c5948] source sha:8ae8e5d12eea6c3416674b4ce83a29fa3e6f99b4
git bisect good 60d83aebbac007b8748a14555e8b0c6d151c5948
# good: [2581327827738b4761fea4e0aca42b9a4e634ee7] source sha:e3190bdef2a3c85559aa761103c198930c7e1164
git bisect good 2581327827738b4761fea4e0aca42b9a4e634ee7
# good: [809d4c2aaba3e6d674ff84eb3ec1f3d4c2eabf09] source sha:9f0827d5824f1418bd3e26bb3ac9458179898e9c
git bisect good 809d4c2aaba3e6d674ff84eb3ec1f3d4c2eabf09
# bad: [26023f36d912a07573321f9051156899242acfd3] source sha:847e004e65ec3c35acff607588d15cd75a84f121
git bisect bad 26023f36d912a07573321f9051156899242acfd3
# good: [abbc9cce0bb6875541ee134c130b717d9c11f2fb] source sha:93136caef5a34d2d4017376fa7192d332765431b
git bisect good abbc9cce0bb6875541ee134c130b717d9c11f2fb
# bad: [a3a54f52dd9b64af1ac52e6ec01783dbc6a62a34] source sha:95c91f098e8974c41c8d403a351fe53db6822165
git bisect bad a3a54f52dd9b64af1ac52e6ec01783dbc6a62a34
# good: [1a65de2d94fe011e7ffbc32634369b6fe4ca1068] source sha:e75057a4d79d96464ff7ddd1511641b23757a502
git bisect good 1a65de2d94fe011e7ffbc32634369b6fe4ca1068
# bad: [55e9bfd88063145339a6b4ebff07cc8bec703bf8] source sha:37a3fc1ca2a08e41dcf39946d891e7e315106d64
git bisect bad 55e9bfd88063145339a6b4ebff07cc8bec703bf8
# bad: [e51fe6c09ef897b04a72e2edd93926698a73f5b5] source sha:511acc66f543b0200ebe70cf072e5a8db8677809
git bisect bad e51fe6c09ef897b04a72e2edd93926698a73f5b5
# bad: [451c61ab9977db40cdd45b10ed3917fc716384da] source sha:6323e6628668849438e6e19ba7ad2c6598263261
git bisect bad 451c61ab9977db40cdd45b10ed3917fc716384da
# first bad commit: [451c61ab9977db40cdd45b10ed3917fc716384da] source sha:6323e6628668849438e6e19ba7ad2c6598263261
Comment 3 Aron Budea 2016-10-11 12:36:57 UTC
Here is the second bibisect. Khaled, this also seems to point to a commit of yours, please check this as well.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=983e03a7d81c0ab24782b28ab899452fa6fd99ac

"Hack to make Arabic subtending marks work
E.g. in Amiri.

Change-Id: Ibdac6b02bdbae40786d7c2c4725641be5cbfb80d"

72be4a22ff3398eaf548437db22209ec053a0c3a is the first bad commit
commit 72be4a22ff3398eaf548437db22209ec053a0c3a
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Fri Sep 30 03:07:06 2016 +0200

    source sha:9f0bf2c32ae5adde6ec73a3eecdb108ab1457049
    
    source sha:9f0bf2c32ae5adde6ec73a3eecdb108ab1457049
    source sha:983e03a7d81c0ab24782b28ab899452fa6fd99ac
    source sha:8e11d353665242fc90ef485ff8f67a44206b6393

# bad: [2b3e66ac7ee5519579db10ec2991bd4bb0842ec6] source sha:f3531bebd1746e2f3cec2a18d92322ab482ee2ab
# good: [33e60eae04c889baf52713a73dc9944015408914] source sha:5b168b3fa568e48e795234dc5fa454bf24c9805e
git bisect start '2b3e66ac7ee5519579db10ec2991bd4bb0842ec6' '33e60eae04c889baf52713a73dc9944015408914'
# good: [117b4d0c0eb7cfba0b9aca38be2e89e3f2850779] source sha:22155f9adbbe853b6e03729605331c06f43972ca
git bisect good 117b4d0c0eb7cfba0b9aca38be2e89e3f2850779
# good: [c6d9ae0df5ed01960da39d2ce3c31f88b4efc745] source sha:ef699b4d41cc602322d980027956aab636c776d5
git bisect good c6d9ae0df5ed01960da39d2ce3c31f88b4efc745
# good: [e749e9063393ff6b44267e860c85c0e1622a266f] source sha:43c6b20b9fef7b6d331ae15cfcc9fd2632799584
git bisect good e749e9063393ff6b44267e860c85c0e1622a266f
# bad: [8d31e9dfb3305269dd7c9449d7bf4fce694f9e86] source sha:1658bd231bc662504a072097dc614c29fe2e116d
git bisect bad 8d31e9dfb3305269dd7c9449d7bf4fce694f9e86
# bad: [f5890be5ba4f1cf7f894d21f2455242e058ccaf8] source sha:c765a6757fd3908ad88e759c5cd7742c2f27eaec
git bisect bad f5890be5ba4f1cf7f894d21f2455242e058ccaf8
# bad: [3e2f3730348d5f9978c190122c3450d80b845004] source sha:b37ca33a703b8d06442e1c9907281aba28399a07
git bisect bad 3e2f3730348d5f9978c190122c3450d80b845004
# bad: [f6113f260df1d33b457d832ada2f33b0b42f87bb] source sha:78404fe5549fded2eaf0c5ea6e1ca66039e995af
git bisect bad f6113f260df1d33b457d832ada2f33b0b42f87bb
# bad: [4086de41c8412938353b3119353efbacab6eb3d5] source sha:d83925c38b809ce4c7a40cd8f839364d57a390dd
git bisect bad 4086de41c8412938353b3119353efbacab6eb3d5
# good: [cb171bc9fda4787743583d2179abdb8685822f17] source sha:ecb2850003ed2e9d40da1c3d3ac3ee043ce2bf76
git bisect good cb171bc9fda4787743583d2179abdb8685822f17
# good: [e5a847ca483e2d1b43d0cbfef6502f32df7c7017] source sha:bbb017f95ec70c8d10dc6e1473f14eeda9ff6144
git bisect good e5a847ca483e2d1b43d0cbfef6502f32df7c7017
# good: [deb52ab785afe29d5f2bc227aa4a07404ee61294] source sha:97dbbf7282b48eccedf60696ad65cf4e9987c7a9
git bisect good deb52ab785afe29d5f2bc227aa4a07404ee61294
# bad: [72be4a22ff3398eaf548437db22209ec053a0c3a] source sha:9f0bf2c32ae5adde6ec73a3eecdb108ab1457049
git bisect bad 72be4a22ff3398eaf548437db22209ec053a0c3a
# good: [277ae6548d678f154d4d2c477fb26e9d40d076f9] source sha:8d458a24f79ed9ba321daa3db283eb22dbd7c27f
git bisect good 277ae6548d678f154d4d2c477fb26e9d40d076f9
# first bad commit: [72be4a22ff3398eaf548437db22209ec053a0c3a] source sha:9f0bf2c32ae5adde6ec73a3eecdb108ab1457049
Comment 4 Khaled Hosny 2016-10-11 13:05:44 UTC
Right, I’m reverting all of these now since work on bug 89870 fixes them in a cleaner way.
Comment 5 Commit Notification 2016-10-11 13:59:12 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f48cbaac0a2a7278f366a3b0118b399c0a938a44

tdf#103103: Many Arabic fonts dont render correctly

It will be available in 5.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2016-10-12 11:40:24 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ed761146be3a274e0f24ab2c02c68e4e6c33e8b4&h=libreoffice-5-2

tdf#103103: Many Arabic fonts dont render correctly

It will be available in 5.2.4.

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

Affected users are encouraged to test the fix and report feedback.
Comment 7 Yousuf Philips (jay) 2016-11-03 14:33:56 UTC
Version: 5.3.0.0.alpha1+
Build ID: 5d39c2013374727b1c8f147b8b99d54402a7ff02
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; VCL: gtk2; Layout Engine: old; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-11-02_00:55:24
Locale: en-US (en_US.UTF-8); Calc: group