Bug Hunting Session
Bug 103134 - Inconsistent character spacing across different fonts, suite versions and operating systems.
Summary: Inconsistent character spacing across different fonts, suite versions and ope...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2016-10-11 21:07 UTC by Dan
Modified: 2018-07-31 09:42 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bug image (93.52 KB, image/png)
2016-10-11 21:07 UTC, Dan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2016-10-11 21:07:52 UTC
Created attachment 127953 [details]
bug image

Tested on;

Operating systems:

Ubuntu 16.04LTS, Ubuntu 16.10, Fedora 24, Ubuntu Gnome 16.04, Arch XFCE, Xubuntu 16.04, Windows 10, Windows 8.1

Libre Office versions:

5.0, 5.1, 5.2

Monitors:

1920x1080 Dell 24", 1280x1024 Dell 17" 

Fonts:

Most common fonts (too many to list)

<Detailed image of the issue included in the attachment>

Bug:
Libre Office writer spaces out individual characters in an inconsistent manner. Some characters have unusually large gaps between them, some are overlapping. Often the same word will look different in the same document which seems to suggest a rendering issue rather than a font issue. I've tested this on multiple operating systems, multiple monitors and multiple office versions and I can't seem to eliminate the bug. The issue often disappears once the zoom level is above 140% and the characters are sufficiently large. Also, this effect is not visible when printing the document on paper. Which again seems to suggest the problem is due to bad displaying/rendering. 

In some instances disabling pair kerning for characters improves spacing but not always and never fixes the problem completely.

I've never experienced anything similar in any other office suite (MS office, WPS office, Gnome office etc...) I haven't tested Open Office extensively but from my limited testing the spacing was handled somewhat better than in Libre Office.

Also, I haven't used other Libre Office apps as much (calc, impress etc..). But checking just now (5.2.2) calc doesn't seem to have this problem, while impress does to some extent since I can see the characters shifting when I type with font size 13 and below regardless of the font.
Comment 1 Dan 2016-10-11 22:40:45 UTC
Also, monospace fonts are not affected.
Comment 2 Buovjaga 2016-11-10 11:46:51 UTC
Could you please test with a fresh 5.3 build, which has the new HarfBuzz font engine enabled by default? http://dev-builds.libreoffice.org/daily/master/?C=M;O=A

Also, please don't set your own reports to NEW.

Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists with a fresh 5.3. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 3 Dan 2016-11-10 12:51:48 UTC
I tested 5.3 alpha just now. I didn't have much time to play around with it but I recorded two screencasts to illustrate that the bug is still present.

Best to watch in full screen to see the spaces changing.

Test 1:
Shows the spacing changes as I type the word "Lorem".

https://www.youtube.com/watch?v=XBve-qlnuSo


Test 2:
Shows the spacing changing between the characters as I resize the application window.

https://www.youtube.com/watch?v=tc_bAA4JeIg
Comment 4 V Stuart Foote 2016-11-10 13:29:41 UTC
Reproducible with Windows 10 Pro 64-bit (1607) en-US and nVidia GTX 750 Ti w/21.21.13.7270 driver with GDI+ rendering, not noticeable with OpenGL rendering

Version: 5.3.0.0.alpha1+
Build ID: f6391d9696bfa7485bf785ac81edef4d5441e232
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-10_00:11:47
Locale: en-US (en_US); Calc: CL

Steps to Reproduce
1. disable OpenGL rendering and restart
2. Open Writer
3. modify default paragraph style, set font to DejaVu Sans
4. enter LOREM
5. F3 to add autotext
6. disable spell check (<Shift>+F7)
7. grab right edge frame to slide LibreOffice window wider and narrower
8. observe affect on document canvas?

result: text shifts while canvas is composed

9. enable OpenGL and restart
10. repeat steps

result: text remains composed
Comment 5 V Stuart Foote 2016-11-10 14:21:55 UTC
Shifting characters on canvas happens with the old layout engine with both default GDI+, and OpenGL rendering.  With the new HarfBuzz based layout engine, it does not happen with the DirectWrite OpenGL rendering, but does happen with the default GDI+ rendering.

So folks with GPUs without OpenGL support will be affected.
Comment 6 Dan 2016-11-10 15:22:24 UTC
I suppose my GPU doesn't support OpenGL since when I enable it and restart LibreOffice it still shows up as disabled. I'm using Nvidia GeForce GTX960 together with Nvidia drivers. I can't recall ever having OpenGL enabled in LibreOffice so can't confirm whether that fixes the issue for me.
Comment 7 V Stuart Foote 2016-11-10 15:54:37 UTC
Your GPU should support the OpenGL 3.2 functional level we use. But, if you have an older driver, there is a "black list" mechanism [1] that will prevent OpenGL from launching. Any nVidia driver less than 353.62 is blocked.

Please post the GPU driver details you now are working with, each instance of LibreOffice will record that into your LibreOffice profile in the cache/opengl_device.log

Please update your GPU Geforce drivers, from nVidia.com--the Windows 10 or 8.1 build might be simplest, and retest with a current driver.

=-ref-=
[1] http://opengrok.libreoffice.org/xref/core/vcl/opengl/opengl_blacklist_windows.xml
Comment 8 Dan 2016-11-10 16:30:11 UTC
System:

Ubuntu 16.04LTS

OpenGL information:

vendor:    NVIDIA Corporation
renderer:  GeForce GTX 960/PCIe/SSE2
version:   4.5.0 NVIDIA 367.57

When I set the OpenGL setting to enabled and restart LibreOffice this results in a crash:

soffice.bin crashed with SIGSEGV in OpenGLContext::AcquireFramebuffer()

When I set it to force against blacklist, it crashes also but this time doesn't recover. As a matter of fact I can't start the application at all.
Comment 9 Dan 2016-11-10 16:33:52 UTC
This is the content of the opengl_devices.log file:

Device Index: 0
  Selected: true
  Device Name: GeForce GTX 960
  Device Vendor: NVIDIA Corporation
  Device Version: OpenCL 1.2 CUDA
  Driver Version: 367.57
  Device Type: gpu 
  Device Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts
  Device OpenCL C Version: OpenCL C 1.2 
  Device Available: true
  Device Compiler Available: true
  Device Linker Available: true
  Platform Name: NVIDIA CUDA
  Platform Vendor: NVIDIA Corporation
  Platform Version: OpenCL 1.2 CUDA 8.0.46
  Platform Profile: FULL_PROFILE
  Platform Extensions: cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts
Comment 10 Buovjaga 2016-11-11 06:47:52 UTC
(In reply to Dan from comment #8)
> When I set it to force against blacklist, it crashes also but this time
> doesn't recover. As a matter of fact I can't start the application at all.

https://wiki.documentfoundation.org/OpenGL#Crash_on_program_start
"On Linux, open the registrymodifications.xcu file found in LibreOffice's user profile folder and change UseOpenGL and ForceOpenGL entries to false"
Comment 11 Dan 2016-11-11 12:26:41 UTC
I deleted that file initially to reset my settings and then realised that I can just turn the setting off by changing it to false. Any idea as to why it crashes with OpenGL on? Is this a known issue or is it just my setup?
Comment 12 Buovjaga 2016-11-11 14:15:31 UTC
(In reply to Dan from comment #11)
> I deleted that file initially to reset my settings and then realised that I
> can just turn the setting off by changing it to false. Any idea as to why it
> crashes with OpenGL on? Is this a known issue or is it just my setup?

Hey, it would be great, if you got a backtrace of the crash on Ubuntu and created an own report for it: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information
Note you have to install a debug package
Comment 13 Dan 2016-11-11 16:34:20 UTC
Thanks, I'll see what I can do when I have some spare time.
Comment 14 QA Administrators 2017-11-12 11:00:43 UTC Comment hidden (obsolete)
Comment 15 V Stuart Foote 2017-11-12 18:04:32 UTC
I can no longer reproduce with STR as in comment 4

=-testing-=
Windows 10 Home 64-bit en-US (ver 1709)

Version: 6.0.0.0.alpha1+
Build ID: a5af0fd9f27af42cf2e8571f659cdad6e606215b
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-11-06_23:18:19
Locale: en-US (en_US); Calc: group

Version: 5.4.3.1 (x64)
Build ID: 32c8895c6cae21571f364dbb059f419a743ee44d
CPU threads: 4; OS: Windows 6.19; UI render: default; 
Locale: en-US (en_US); Calc: group
Comment 16 mango wodzak 2017-12-23 01:54:03 UTC
I'm using v5.4.4 and experiencing similar problems cross platform with the Trebuchet MS font. Spacing is different between Windows 10 and Windows 7 as well as Ubuntu 17.10 which has the largest spacing..
Comment 17 Buovjaga 2017-12-24 12:11:34 UTC
Dan: how is it looking for you?
Comment 18 QA Administrators 2018-07-03 14:15:21 UTC Comment hidden (obsolete)
Comment 19 QA Administrators 2018-07-31 09:42:19 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20180731