Bug Hunting Session
Bug 127325 - Rendering (stamping) of rotated text is incorrect with OpenGL rendering enabled - severe clipping of glyphs on Vertical ruler, and rotated table cell text
Summary: Rendering (stamping) of rotated text is incorrect with OpenGL rendering enabl...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+ Master
Hardware: All Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0
Keywords: bibisected, regression
: 127580 (view as bug list)
Depends on:
Blocks: Font-Rendering VCL-OpenGL
  Show dependency treegraph
 
Reported: 2019-09-04 05:20 UTC by V Stuart Foote
Modified: 2019-09-22 18:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
numbering on vertical ruler is broken (32.67 KB, image/png)
2019-09-04 05:36 UTC, V Stuart Foote
Details
sample document table with rotated text showing clipped glyphs with OpenGL rendering (84.29 KB, application/vnd.oasis.opendocument.text)
2019-09-15 14:49 UTC, V Stuart Foote
Details
clipped rotated text in Calc cells with OpenGL rendering (34.16 KB, image/png)
2019-09-15 16:52 UTC, V Stuart Foote
Details
same Windows system with default GDI rendering, font well formed (40.55 KB, image/png)
2019-09-15 16:54 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2019-09-04 05:20:02 UTC
The numbers of the Vertical Ruler are not formed correctly when OpenGL rendering is enabled. But when default rendering, HA or CPU is enabled the numbered labeling of the vertical ruler is correct.

Windows 10 Home 64-bit en-US (1903) with Intel HD Graphics 630 with recent builds of Master/6.4.0

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 41cd3e8e817c8c33a13608e62eeb06ce2c6977e4
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-01_22:04:10
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

Not present in Version: 6.3.0.4 (x64)
Build ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 2 V Stuart Foote 2019-09-04 05:36:44 UTC
Created attachment 153855 [details]
numbering on vertical ruler is broken
Comment 3 V Stuart Foote 2019-09-15 14:23:32 UTC
Affects more than just the rotated text of the vertical ruler. With OpenGL rendering enabled (on Winodws builds at least) font metrics are incorrectly used and glyphs are clipped when stamped.

I was working with rotating text of table cells for bug 127485 and noticed more than just the vertical ruler mark, all rotated text is being clipped when OpenGL rendering is enabled. OK with 6.3.1.2 and builds of master through 2019-08-16, suggests recent change to Direct2D DirectWrite handling.

Attached document with table 'Table contents' style adjusted to use Noto Sans and all table cell contents rotated, and column width and column height optimized for the full table.

While test document has style changed, with OpenGL rendering enabled, using any font's rotated glyphs are clipped when stamped to canvas.
Comment 4 V Stuart Foote 2019-09-15 14:49:05 UTC
Created attachment 154174 [details]
sample document table with rotated text showing clipped glyphs with OpenGL rendering
Comment 5 V Stuart Foote 2019-09-15 16:52:43 UTC
Created attachment 154176 [details]
clipped rotated text in Calc cells with OpenGL rendering

To be expected, clipping with OpenGL rendering also affecting Calc cells with rotated text.
Comment 6 V Stuart Foote 2019-09-15 16:54:16 UTC
Created attachment 154177 [details]
same Windows system with default GDI rendering, font well formed

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 0d0e8533afe565564835e6d51500e64066fd565b
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-09-14_07:47:01
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 7 Khaled Hosny 2019-09-15 20:45:15 UTC
Most likely caused by this https://cgit.freedesktop.org/libreoffice/core/commit/?id=502d73cda8fa1f482634bb6435fd1440757fdad9. I don’t have time to debug it, but if someone can confirm this is real cause I’ll revert it.
Comment 8 V Stuart Foote 2019-09-21 12:38:12 UTC
*** Bug 127580 has been marked as a duplicate of this bug. ***
Comment 9 V Stuart Foote 2019-09-21 12:40:19 UTC
Roman K. bisected the chart labeling of bug 127580

<clip>
asus@notebook-2 /cygdrive/d/logit/bibisect-win64-6.4
$ git bisect good
237d634d91cd5d1a27714eeedf2f0537691d94e2 is the first bad commit
commit 237d634d91cd5d1a27714eeedf2f0537691d94e2
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Sun Aug 25 03:32:10 2019 -0700

    source sha:502d73cda8fa1f482634bb6435fd1440757fdad9

https://gerrit.libreoffice.org/#/c/77870/
</clip>
Comment 10 Commit Notification 2019-09-22 05:36:04 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4ce644feaa732e9f306e6c53300e024ac2a11bb7

tdf#127325: Revert "Use HarfBuzz to get glyph bounding rectangle"

It will be available in 6.4.0.

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

Affected users are encouraged to test the fix and report feedback.