Bug 494281 - [GTK3] StyledText style.underline = true not work on ubuntu 16.04
Summary: [GTK3] StyledText style.underline = true not work on ubuntu 16.04
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo, triaged
Depends on:
Blocks: 492371
  Show dependency tree
 
Reported: 2016-05-23 06:26 EDT by Sergey Nazarov CLA
Modified: 2018-06-18 22:17 EDT (History)
4 users (show)

See Also:


Attachments
Snippet189 (1.89 KB, text/x-java)
2016-06-03 11:11 EDT, Marc-André Laperle CLA
no flags Details
Screen shot (32.93 KB, image/png)
2016-06-03 11:25 EDT, Marc-André Laperle CLA
no flags Details
A sample program to test underline style (3.06 KB, application/octet-stream)
2016-09-26 12:53 EDT, Mikaël Barbero CLA
no flags Details
Screen shot (142.21 KB, image/png)
2016-10-03 17:52 EDT, Marc-André Laperle CLA
no flags Details
Snippet with different font height (2.32 KB, text/plain)
2016-10-03 17:53 EDT, Marc-André Laperle CLA
no flags Details
GTK project with snippet (2.85 KB, application/gzip)
2016-10-18 00:06 EDT, Marc-André Laperle CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Nazarov CLA 2016-05-23 06:26:25 EDT
StyledText style.underline = true not work on ubuntu 16.04. Checked on ubuntu 14.04 and it works good.
Comment 1 Marc-André Laperle CLA 2016-06-03 10:19:10 EDT
Do you have an example of there this is done in Eclipse? Or perhaps a snippet? Thanks!
Comment 2 Marc-André Laperle CLA 2016-06-03 11:11:52 EDT
Created attachment 262227 [details]
Snippet189

OK I see it with Snippet189 (attached)
Comment 3 Marc-André Laperle CLA 2016-06-03 11:25:57 EDT
Created attachment 262228 [details]
Screen shot
Comment 4 Mikaël Barbero CLA 2016-09-26 12:53:22 EDT
Created attachment 264421 [details]
A sample program to test underline style

Can't reproduce with Neon.1 RC4 on Fedora 24 (gtk 3.20.9).

I've debugged TextLayout.computeRuns() on both systems and everything looks similar.

For the record, 

Ubuntu 16.04, libpango is 1.38.1 
on Fedora 24, pango is 1.40.1

I have also compiled and tested a modified version of cairosimple example from the pango source (see attachment). It also properly draws the underline style in both cases... 

To compile it:

$ gcc -Wall -g $(pkg-config --cflags pangocairo) cairosimple.c -o cairosimple $(pkg-config --libs pangocairo) -lm

and to run it:

$ ./cairosimple output.png # output.png is the result

Hope this helps.
Comment 5 Marc-André Laperle CLA 2016-10-03 01:21:44 EDT
Mikaël, do you see the bug with the snippet I attached? I can't reproduce the issue anymore. Maybe something in the theming changed on the Ubuntu side?
Comment 6 Mikaël Barbero CLA 2016-10-03 05:25:07 EDT
Unfortunately, I still see the bug with Snippet189 (fully updated Ubuntu 16.04, SWT binary tag v4713, SWT commit 9026eefff4d74dfd96b7764e3570488af9e98dea). Did you re-install Ubuntu from scratch or just updated it?
Comment 7 Marc-André Laperle CLA 2016-10-03 17:38:51 EDT
Interesting, I was able to reproduce it again. It was because of my "Text Scaling factor" that was set to 0.95 instead of 1 (in Unity Tweak Tool). Once I set it back to 1, then I see the problem again. That could be a useful clue...
Comment 8 Marc-André Laperle CLA 2016-10-03 17:52:25 EDT
Created attachment 264551 [details]
Screen shot

This bug seems very sensitive to font height. I modified the snippet to show this. The bug is there for 11, 12, 13 and 17 points.
Comment 9 Marc-André Laperle CLA 2016-10-03 17:53:36 EDT
Created attachment 264552 [details]
Snippet with different font height
Comment 10 Marc-André Laperle CLA 2016-10-18 00:06:27 EDT
Created attachment 264904 [details]
GTK project with snippet

I've been trying to reproduce this bug with GTK-only code without success. Here is the project I came up with. Perhaps someone else has an idea.
Comment 11 Eric Williams CLA 2018-06-15 15:37:22 EDT
Is this still an issue on Ubuntu 18.04 with 4.8 RCx?
Comment 12 Marc-André Laperle CLA 2018-06-18 22:17:24 EDT
(In reply to Eric Williams from comment #11)
> Is this still an issue on Ubuntu 18.04 with 4.8 RCx?

Not, it works correctly on Ubuntu 18.04 with 4.8rc4a. TBH, I don't think anyone will be looking at this issue. It's likely that the bug is not on the Eclipse side either, so I'll close this.