Bug 103870 - HarfBuzz Textbox incorrectly placed
Summary: HarfBuzz Textbox incorrectly placed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Regressions-HarfBuzz
  Show dependency treegraph
 
Reported: 2016-11-11 16:47 UTC by Xisco Faulí
Modified: 2016-11-20 01:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (161.01 KB, application/vnd.oasis.opendocument.text)
2016-11-11 16:47 UTC, Xisco Faulí
Details
comparison (6.26 MB, application/pdf)
2016-11-11 16:50 UTC, Xisco Faulí
Details
sample document with new (L) and old (R) text layout and OpenGL rendering (308.58 KB, image/png)
2016-11-12 19:52 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2016-11-11 16:47:39 UTC
Created attachment 128667 [details]
sample

Steps to reproduce:
1. Open attach document with SAL_USE_COMMON_LAYOUT=1
2. Open attach document with SAL_NO_COMMON_LAYOUT=1
3. Compare the results

Reproduced in

Version: 5.3.0.0.alpha1+
Build ID: 60da087d7e182b58b63d4123c9bd96c82376d450
CPU Threads: 4; OS Version: Linux 4.2; UI Render: default; VCL: gtk2; Layout Engine: new; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 1 Xisco Faulí 2016-11-11 16:50:56 UTC
Created attachment 128668 [details]
comparison
Comment 2 ⁨خالد حسني⁩ 2016-11-11 17:28:08 UTC
Looks like you are getting shorter text, which in turn causes different line breaks and finally different number of lines and the text box eventually moves up.

The shorter text might be related to bug 103765, but I don’t have the font to confirm.
Comment 3 V Stuart Foote 2016-11-12 19:52:11 UTC
Created attachment 128701 [details]
sample document with new (L) and old (R) text layout and OpenGL rendering

The sample document rendered on Windows 10 Pro 64-bit (1607) en-US with
Version: 5.3.0.0.alpha1+
Build ID: ba8a41bac3765f7b3562d357aeb13f752ea14ba4
CPU Threads: 8; OS Version: Windows 6.2; UI Render: GL; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-11_22:52:38
Locale: en-US (en_US); Calc: CL

Using OpenGL rendering for both.

On the left is the new HarfBuzz based layout, on the right is the old DirectWrite only layout.

At this scale (fit page) the new HarfBuzz layout does not honor existing hyphen breaks, and text does extend beyond right margin of text frames. But as I zoom in and out, the text is recomposed and hyphen breaks occur.

This seems a little unstable.
Comment 4 ⁨خالد حسني⁩ 2016-11-15 23:26:29 UTC
Is this still an issue?
Comment 5 V Stuart Foote 2016-11-16 08:29:49 UTC
Yes, still see it with 

Version: 5.3.0.0.alpha1+
Build ID: 84f644eee78106f01486098d446d9163b62927eb
CPU Threads: 8; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-11-15_23:52:44
Locale: en-US (en_US); Calc: CL

and looks like bug 103942 is a duplicate.
Comment 6 V Stuart Foote 2016-11-16 08:30:57 UTC
And that is with and without OpenGL with the new layout engine.
Comment 7 Xisco Faulí 2016-11-19 10:46:23 UTC
I can no longer reproduce it in

Version: 5.3.0.0.alpha1+
Build ID: 9745d29227e471ce40e9992fefd92e10a48696fb
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Closing it as RESOLVED WORKSFORME
Comment 8 ⁨خالد حسني⁩ 2016-11-19 23:22:17 UTC
Please retest this, I reverted the fix for bug 103765 (as it caused bug 103891), and this might be broken again :(
Comment 9 V Stuart Foote 2016-11-20 01:57:07 UTC
Seems correct even with application of
https://cgit.freedesktop.org/libreoffice/core/commit/?id=d35b5c8db00afb0316b7ae4c43126a5dad194cbb