Bug 103891 - Nonprinting character white space markings not scaled correctly with new layout engine
Summary: Nonprinting character white space markings not scaled correctly with new layo...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: Font-Rendering Formatting-Mark Regressions-HarfBuzz
  Show dependency treegraph
 
Reported: 2016-11-12 16:45 UTC by V Stuart Foote
Modified: 2017-05-02 23:53 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
the white space NPC with new text layout on left and old text layout on right (1.02 MB, image/png)
2016-11-12 21:18 UTC, V Stuart Foote
Details
sample Dummy Text used to show NPC spacing issues (13.30 KB, application/vnd.oasis.opendocument.text)
2016-11-16 05:02 UTC, V Stuart Foote
Details
example from Linux 64 bits still showing the issue (73.40 KB, application/vnd.oasis.opendocument.text)
2016-11-16 08:02 UTC, Cor Nouws
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2016-11-12 16:45:20 UTC
Description:
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

Adjustments for scaling do not seem to be applied to positioning of the non-printing character white space markings.  They are mispositioned across lines of text on the canvas.

Steps to Reproduce:
1. Open writer with OpenGL and new HarfBuzz text layout enabled
2. enter dummy text
3. enable display of non-printing chracters
 

Actual Results:  
the blue dots for space NPC are mispositioned

Expected Results:
the blue dots would be centered the blank area of each space character. 


Reproducible: Always

User Profile Reset: Yes

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 Cor Nouws 2016-11-12 18:36:21 UTC
confirming in Version: 5.3.0.0.alpha1+
Build ID: 0af30952982767543cddd0b1ce643cb8d5c253a2
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-11-11_23:43:27
Locale: nl-NL (nl_NL.UTF-8); Calc: group

thanks for filing Stuart.
Comment 2 Yousuf Philips (jay) (retired) 2016-11-12 20:16:24 UTC
@Stuart: So does this issue not happen with the default UI renderer for you as Cor is confirming using the default renderer?

I'm unable to reproduce this, so some screenshots would be useful to compare against.

Version: 5.3.0.0.alpha1+
Build ID: 78b4a1fb01af9ad3b3395a22f6e396be914b553e
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; VCL: gtk2; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-11-11_06:57:24
Locale: en-US (en_US.UTF-8); Calc: group
Comment 3 V Stuart Foote 2016-11-12 21:18:04 UTC
Created attachment 128702 [details]
the white space NPC with new text layout on left and old text layout on right

It happens with both OpengGL and default GDI+ with then new HarfBuzz based text layout engine. 

In the attached clips new layout engine on left old DirectWrite/GDI+ on right. OpenGL on top and default rendering on bottom.

The view for each panel was View -> Zoom -> Page Width for a Writer session with DT -> F3 insertion.
Comment 4 V Stuart Foote 2016-11-13 14:03:30 UTC
@Khaled, *

So looks like this is actually a regression from work to try to correct horizontal spacing on the Windows builds-- bug 103725

https://cgit.freedesktop.org/libreoffice/core/commit/?id=30fefcf71417f8c8644f5c0d3cb28c8c7f92a6c7

before that the NPC spacing was good.
Comment 5 ⁨خالد حسني⁩ 2016-11-13 14:31:47 UTC
I can reproduce this on Windows, but not only the visible space is wrong, there is a general dissociation between the cursor positions and the actual rendering on screen, with or without width scaling.
Comment 6 ⁨خالد حسني⁩ 2016-11-15 03:43:03 UTC
That commit have been reverted (while I’m working for a better fix), is this issue fixed now?
Comment 7 V Stuart Foote 2016-11-15 13:25:47 UTC
@Khaled,

Not sure the reversion in https://cgit.freedesktop.org/libreoffice/core/commit/?id=ea95ced269dceb72681f0e4a21d87499153d5781 actually touched this.

On Windows 10 Pre 64-bit (1607) en-US with
Version: 5.3.0.0.alpha1+
Build ID: bb50b1609abe83265311613db4a18e992dc666c8
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-14_23:25:25
Locale: en-US (en_US); Calc: CL

Same STR using a DT -> F3 dummy text paragraph with NPC enabled and zoom set to page width.  Zooming in or out with the spinner control in the "Zoom & View Layout" dialog (click the status bar Zoom display widget lower right) renders the NPC at different spacing to the text.

No difference between OpenGL and default GDI+ rendering.

Reverting to the old text layout, the NPC are spaced accurately.

Saw the new in https://cgit.freedesktop.org/libreoffice/core/commit/?id=a5750d92b2136d60d698b41ef5760f2efac0ffce will check that when it rolls this evening.
Comment 8 ⁨خالد حسني⁩ 2016-11-15 23:24:49 UTC
If this is still an issue, please attach the document shown in the screenshot.
Comment 9 V Stuart Foote 2016-11-16 05:02:52 UTC
Created attachment 128779 [details]
sample Dummy Text used to show NPC spacing issues

Still having issue with NPC with new HarfBuzz layout and both OpenGL and default GDI rendering.

On Windows 10 Pro 64-bit (1607) en-US with
Version: 5.3.0.0.alpha1+
Build ID: 84f644eee78106f01486098d446d9163b62927eb
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-15_23:52:44
Locale: en-US (en_US); Calc: CL

As the document canvas is zoomed in and out (mouse scroll wheel, or widgets from Zoom & View Layout dialog) the NPC representing the space characters are not aligning with their space characters in the text.
Comment 10 Cor Nouws 2016-11-16 08:02:09 UTC
Created attachment 128783 [details]
example from Linux 64 bits still showing the issue
Comment 11 ⁨خالد حسني⁩ 2016-11-19 13:43:41 UTC
This seems to be a regression from the fix for bug 103827, I’m going to revert that (git seems to be down now).
Comment 12 ⁨خالد حسني⁩ 2016-11-19 13:44:40 UTC
Sorry meant bug 103765.
Comment 13 V Stuart Foote 2016-11-20 01:51:04 UTC
Seems better now with application of
https://cgit.freedesktop.org/libreoffice/core/commit/?id=d35b5c8db00afb0316b7ae4c43126a5dad194cbb