Bug 107205 - Rotated text and glyph scaling broken with shift to DirectWrite rendering
Summary: Rotated text and glyph scaling broken with shift to DirectWrite rendering
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All Windows (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:5.4.0 target:5.3.4 target:5.3.3
Keywords: bisected, regression
: 107399 107400 107408 107412 107456 (view as bug list)
Depends on:
Blocks: Font-Rendering
  Show dependency treegraph
 
Reported: 2017-04-16 15:04 UTC by Tamás Zolnai
Modified: 2019-02-15 13:25 UTC (History)
11 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing expected and actual rendering (61.01 KB, image/png)
2017-04-16 15:10 UTC, Tamás Zolnai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2017-04-16 15:04:17 UTC
Description:
In a Calc cell text can be rotated with any rotation angle. The rendering of the rotated text became broken recently on master branch (see the screenshots).

Steps to Reproduce:
1. Open Calc
2. Open Format Cells Dialog and switch to Alignment page
3. Change text rotation to 90 or 270 degree

Actual Results:  
When text rotation is set to 90 degrees text disappears. When it is set to 270 degrees text rendered as stacked text, not as a rotated one.

Expected Results:
Both 90 and 270 degrees text rotation should be rendered correctly.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
Comment 1 Tamás Zolnai 2017-04-16 15:09:34 UTC
The main issue is not the preview of the rotated text on the Format Cells dailog, but text is also rendered on the same wrong way on the spreadsheet.
Comment 2 Tamás Zolnai 2017-04-16 15:10:14 UTC
Created attachment 132606 [details]
Screenshot showing expected and actual rendering
Comment 3 m_a_riosv 2017-04-16 15:23:42 UTC
Reproducible.
Version: 5.4.0.0.alpha0+
Build ID: 04edc5c796c1b96e5228d0c1fcf73bcf52465b66
CPU threads: 4; OS: Windows 6.2; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-04-15_02:19:58
Locale: es-ES (es_ES); Calc: CL

With/without OpenCL enable.
Comment 4 Tamás Zolnai 2017-04-17 13:33:11 UTC
On linux it's not reproducable, might be a Windows only problem.
Comment 5 Tamás Zolnai 2017-04-20 09:13:54 UTC
@ Khaled,

Any idea a about this bug?
Comment 6 Aron Budea 2017-04-23 21:14:02 UTC
Reproduced with a master build from yesterday, not reproduced with the below daily build. Regression was introduced between 2017-04-13_15:11:43 and 2017-04-15_02:19:58.

Version: 5.4.0.0.alpha0+
Build ID: 78869ad9d4c904e665529befe5181ea5121fba1d
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-04-13_15:11:43
Locale: hu-HU (hu_HU); Calc: CL
Comment 7 Tamás Zolnai 2017-04-24 04:00:55 UTC
Thanks Aron for tightening the commit range. I found the actual commit which causes this regression:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=df556aa47da22f96b3fcd356c12419d3035cba3c

Unfortunately it was also back-ported to libreoffice-5-3 branch:
https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-5-3&id=1ba5bae490f7e14e475e0b80f03e5f444cdce908

@Michael, do you have any idea, what is the problem here? I can't see why rendering is changed.
Comment 8 Michael Stahl (allotropia) 2017-04-24 16:03:23 UTC
oops, my fault, i didn't notice that there are intentionally 2 renderers,
apparently because rotation isn't implemented for the DirectWrite case.

i'm working on a fix...
Comment 9 Michael Stahl (allotropia) 2017-04-24 16:41:55 UTC
fixed on master
Comment 10 Commit Notification 2017-04-24 16:44:50 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#107205 vcl: don't always use D2DWriteTextOutRenderer

It will be available in 5.4.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 11 V Stuart Foote 2017-04-24 21:02:45 UTC
*** Bug 107399 has been marked as a duplicate of this bug. ***
Comment 12 V Stuart Foote 2017-04-24 21:16:23 UTC
*** Bug 107400 has been marked as a duplicate of this bug. ***
Comment 13 V Stuart Foote 2017-04-25 03:31:28 UTC
On Windows 10 Pro 64-bit en-US with
Version: 5.4.0.0.alpha0+
Build ID: a917902c48f21d04039da86048c5c36555137d7e
CPU threads: 8; OS: Windows 6.2; UI render: GL; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-04-24_23:35:22
Locale: en-US (en_US); Calc: CL

Rotated text in Calc cells and entries on the Vertical rulers has been restored.
Comment 14 V Stuart Foote 2017-04-25 03:49:20 UTC
Checked against past issues with rotated text notably bug 103767 and bug 100986 -- both had regressed notably, but are now restored with this commit.

See Regina's test attachment 128554 [details] from tdf#103767
Comment 15 V Stuart Foote 2017-04-25 17:01:03 UTC
*** Bug 107408 has been marked as a duplicate of this bug. ***
Comment 16 V Stuart Foote 2017-04-25 17:11:15 UTC
I think as expected, the issues were not just with lack of text rotation with our D2DWrite implementation, but also with glyph scaling.  

Bug 107408 was for loss of scaling of glyphs in math formula. The 2eb91035c2f60e9dc476336474d51b23b666bb04 commit corrected that as well.

Adjusted summary.
Comment 17 V Stuart Foote 2017-04-25 17:25:59 UTC
*** Bug 107412 has been marked as a duplicate of this bug. ***
Comment 18 Commit Notification 2017-04-26 13:10:47 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8f51b4272450b6220f563740538f143c0bc70175&h=libreoffice-5-3

tdf#107205 vcl: don't always use D2DWriteTextOutRenderer

It will be available in 5.3.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 19 m_a_riosv 2017-04-28 23:02:52 UTC
*** Bug 107456 has been marked as a duplicate of this bug. ***
Comment 20 Pierre C 2017-04-29 06:45:28 UTC
I would like to test the patch, but there is no win built since April the 24th.
Sadly this patch will not be in 5.3.3RC2
Comment 21 Stefan_Lange_KA@T-Online.de 2017-04-29 10:51:36 UTC
Because not only one application is affected by this bug, but several (Draw, Calc, Writer, more?), I mean it would be bad not only for users, but also for the image of LibreOffice, when LO 5.3.3 will be published with this error.
IMHO it would by better when the publication of LO 5.3.3 RC2 and - if necessary - LO 5.3.3 (release) would be delayed until the error is corrected, that means the patch is pushed to LO 5.3.3.
Especially it is important, that also a windows version of LO 5.3.4 -> LO 5.3.3 with the patch will be available for test asap.
Comment 22 V Stuart Foote 2017-04-29 12:39:11 UTC
The 5.3.3 patch is up for review
https://gerrit.libreoffice.org/#/c/36990/

cloph's TB62 is turning both 32 and 64-bit builds of master where the patch has been applied and can be tested.
Comment 23 Pierre C 2017-04-30 08:06:05 UTC
Today, April the 30th, still no Daily built for win since the 24th
http://dev-builds.libreoffice.org/daily/libreoffice-5-3/
Comment 24 Commit Notification 2017-05-02 15:49:30 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3-3":

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

tdf#107205 vcl: don't always use D2DWriteTextOutRenderer

It will be available in 5.3.3.

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 25 Stefan_Lange_KA@T-Online.de 2017-05-04 12:28:28 UTC
Because there are no new builds of LO 5.3 for Windows since April 24 (not 5.3.3 and also not 5.3.4) I have specifically for this test installed Ubuntu - and there LO dev 5.3.4.0.0+ .

Result:

With

Version: 5.3.4.0.0+
Build ID: bb6d2d3476b0acfd92dc75ed26836ab2ff817378
CPU Threads: 4; OS Version: Linux 4.10; UI Render: default; VCL: gtk2; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-3, Time: 2017-05-03_13:18:13
Locale: de-DE (de_DE.UTF-8); Calc: group

rotated text is displayed correctly in Calc as well as in Writer.

But I'm not sure if a test on Ubuntu can be a complete replacement for a test on Windows.

Test with LO 5.3.3 is still open!
Comment 26 Stefan_Lange_KA@T-Online.de 2017-05-05 06:19:59 UTC
Test with Windows version of LO 5.3.3 rc2

Version: 5.3.3.2 (x64)
Build-ID: 3d9a8b4b4e538a85e0782bd6c2d430bafe583448
CPU-Threads: 4; BS-Version: Windows 6.19; UI-Render: Standard; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE); Calc: group

was OK, tested in Calc and in Writer!