After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 90919 - GtkTextView displays overlapped charecters if line is too long
GtkTextView displays overlapped charecters if line is too long
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.0.x
Other All
: High major
: ---
Assigned To: gtk-bugs
gedit QA volunteers
: 440383 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-08-16 06:49 UTC by Jathish
Modified: 2010-10-04 08:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
open the file with gedit (20.32 KB, text/plain)
2002-08-16 06:51 UTC, Jathish
Details
The problem (40.80 KB, image/png)
2002-08-28 10:30 UTC, Paolo Maggi
Details
Using the default theme font (47.03 KB, image/png)
2002-08-28 10:32 UTC, Paolo Maggi
Details
Only pango, no GtkTextView (768 bytes, text/plain)
2006-06-22 18:20 UTC, Yevgen Muntyan
Details
testtext (6.93 KB, image/png)
2006-06-22 18:23 UTC, Yevgen Muntyan
Details
pango only (1.23 KB, text/plain)
2006-06-22 22:56 UTC, Yevgen Muntyan
Details
screenshot (20.38 KB, image/png)
2007-10-07 18:31 UTC, Yevgen Muntyan
Details
screenshot (54.79 KB, image/png)
2007-10-20 06:01 UTC, Yevgen Muntyan
Details
screenshot (51.03 KB, image/png)
2007-10-20 06:02 UTC, Yevgen Muntyan
Details
the text from screenshots (30.11 KB, text/plain)
2007-10-20 06:03 UTC, Yevgen Muntyan
Details
Bug in gedit 2.30.3 (124.21 KB, image/png)
2010-10-04 08:04 UTC, Marcin Lewandowski
Details

Description Jathish 2002-08-16 06:49:38 UTC
Tested on Solaris Intel with sources taken on Aug 6 13:26:00 BST 2002  

Desription:
Gedit displays overlapped charecters if line is too long


If a line contains lots of charecters (i've created this scenario by 
replacing find with findfind and repeat the replace operation for many 
times), we can find some charecters gets ovelapped.

You can see this when you open the attached file with gedit and goes to 
the 8th line
Comment 1 Jathish 2002-08-16 06:51:59 UTC
Created attachment 10518 [details]
open the file with gedit
Comment 2 Paolo Maggi 2002-08-16 09:14:58 UTC
Are you able to reproduce this bug with gtk-demo (GtkTextView demo) or
testtext in the gtk+/tests directory or with bug-buddy?
Comment 3 Luis Villa 2002-08-16 19:59:13 UTC
As per Paolo's comment.
Comment 4 Jathish 2002-08-22 10:11:48 UTC
I am able to open the same file with testtext without any overlapped 
charecters. I think its a problem with gedit.
Comment 5 Paolo Maggi 2002-08-28 10:29:59 UTC
I'm attaching two screenshots.

The fist one shows this problem (using the Courier New 13 font)
The second one shows that the problem is not reproducible if you use
the default theme font (this is the reason it is not reproducible
using gtk-demo and testtext).

I think this is a GtkTextView problem.

hp: any idea?
Comment 6 Paolo Maggi 2002-08-28 10:30:31 UTC
Created attachment 10759 [details]
The problem
Comment 7 Paolo Maggi 2002-08-28 10:32:35 UTC
Created attachment 10760 [details]
Using the default theme font
Comment 8 Havoc Pennington 2002-08-28 14:24:31 UTC
I'll believe it's a textview bug, but offhand I have no idea what
would cause it.
Comment 9 Paolo Maggi 2002-08-28 14:30:52 UTC
Should I file it against gtk+/GtkTextView, then?
Comment 10 Luis Villa 2002-12-05 22:54:14 UTC
Making all 'high' textview bugs 2.2.0 as per havoc's request.
Comment 11 Owen Taylor 2002-12-09 15:04:43 UTC
Should be fixed in current Pango CVS

*** This bug has been marked as a duplicate of 73199 ***
Comment 12 Paolo Maggi 2006-06-22 18:00:39 UTC
I still can reproduce it with gedit 2.14.

May be it is a Pango issue.

Bug #73199 does not seem related to this problem.

To reproduce it, open the file in comment #1 with gedit.
Comment 13 Paolo Maggi 2006-06-22 18:06:43 UTC
I can reproduce also with gtk+ CVS HEAD.

Using testtext on CVS HEAD I don't get overlapped charecters by I get some weird redrawing problems on the same line.
Comment 14 Yevgen Muntyan 2006-06-22 18:09:12 UTC
Reproduces in gtk-2.8, and in cvs head. You may not *see* the overlapping
characters immediately; overlapping seems to always happen, but sometimes
characters are drawn close enough to each other; apparently it depends on font
used. I have boldish text as a result in testtext.
Another part, the blank space in almost whole line, reproduces fine. So it
looks like long line is broken into pieces, and those pieces areall drawn in
the beginning of the line.
It's enough to make 4800-chars line here to reproduce.
Comment 15 Yevgen Muntyan 2006-06-22 18:20:58 UTC
Created attachment 67860 [details]
Only pango, no GtkTextView

It doesn't reproduce with a simple pango layout drawn onto a drawing area, see the test case.
Comment 16 Yevgen Muntyan 2006-06-22 18:23:02 UTC
Created attachment 67861 [details]
testtext

You can see that the first line looks darker than the second one.
Comment 17 Behdad Esfahbod 2006-06-22 21:47:36 UTC
There are a set of bugs about text rendering problems with > 64k pixels, and that's due to X's 16bit offsets.  There's a cairo bug open for it IIRC.
Comment 18 Yevgen Muntyan 2006-06-22 22:35:35 UTC
There are about 35 thousand pixels.
Comment 19 Yevgen Muntyan 2006-06-22 22:52:37 UTC
Sorry for the spam, but it does reproduce with a pango layout drawn to a drawing area, just resize it to 30,000 pixels.
Comment 20 Yevgen Muntyan 2006-06-22 22:56:43 UTC
Created attachment 67872 [details]
pango only

Test case with a pango layout and drawing area.
Comment 21 Rob Bradford 2006-06-29 12:54:48 UTC
Setting GNOME version to 2.14 as per comment #12. 
Comment 22 Yevgen Muntyan 2007-09-04 16:10:11 UTC
*** Bug 440383 has been marked as a duplicate of this bug. ***
Comment 23 Behdad Esfahbod 2007-10-07 18:16:41 UTC
Fixed this a while ago.
Comment 24 Yevgen Muntyan 2007-10-07 18:31:55 UTC
Created attachment 96840 [details]
screenshot

On this screenshot you can see a long line of 'w' characters, meaning that due to the bug you can't see anything. It's recentish gtk, from few weeks ago. So it's not fixed.
Comment 25 Paolo Borelli 2007-10-08 13:15:12 UTC
confirmed. I can still reproduce it too.
Comment 26 Yevgen Muntyan 2007-10-20 06:01:42 UTC
Created attachment 97504 [details]
screenshot

Something funny is going on, not just overlapping characters but also duplicated left part of the textview (on the second screenshot).
Comment 27 Yevgen Muntyan 2007-10-20 06:02:48 UTC
Created attachment 97505 [details]
screenshot

Note the scrollbar location, it's the left part of the textview drawn in the middle.
Comment 28 Yevgen Muntyan 2007-10-20 06:03:25 UTC
Created attachment 97506 [details]
the text from screenshots
Comment 29 Behdad Esfahbod 2007-10-20 06:54:53 UTC
Anyone can confirm it with cairo-1.4.10?  I tested now with latest git cairo and definitely can't reproduce it.

What I can reproduce is that scrolling to the end of such a long line makes the line disappear.  That's because of a known cairo 16-bit limitation that we are already working on fixing.
Comment 30 Yevgen Muntyan 2008-03-05 20:40:18 UTC
For what it's worth, I immediately get the text drawn in the middle of textview (i.e. screenshot from comment #27, without overlapping characters) when open file from comment #28. I have these versions of libraries (Debian testing):

$ pkg-config --modversion pango cairo gtk+-2.0
1.18.4
1.4.14
2.12.1
Comment 31 Johannes Schmid 2008-03-10 22:17:17 UTC
(In reply to comment #29)
> Anyone can confirm it with cairo-1.4.10?  I tested now with latest git cairo
> and definitely can't reproduce it.

Yes, I can reproduce it with cairo-1.4.10 (it's shipped with Ubuntu Gutsy). Use the file that is linked from comment #19 of bug #114337 by Massimo and the GtkSourceView test in gtksourceview/tests/test-widgets.

Note: It does not happen in a GtkTextView only application (like the GtkTextView test in gtk+), so it might be related to GtkSourceView. 
Comment 32 Behdad Esfahbod 2008-03-11 04:58:49 UTC
I looked at this a while ago, fixed some bugs, and it was really working, except that scrolling to about the end of the line made the line disappear.  That was caused by cairo's 16.16 fixed format.  Should be improved by latest cairo 1.5.x that has switched to 24.8.  Can someone test latest cairo 1.5.x?
Comment 33 Johannes Schmid 2008-03-11 10:56:45 UTC
> That was caused by cairo's 16.16 fixed format.  Should be improved by latest
> cairo 1.5.x that has switched to 24.8.  Can someone test latest cairo 1.5.x?

OK, Ubuntu to Hardy and yes, new cairo fixes it.
Comment 34 Yevgen Muntyan 2008-03-11 22:26:01 UTC
Fixed!!!
Comment 35 Behdad Esfahbod 2008-03-12 13:25:41 UTC
Ok, lets close!
Comment 36 Marcin Lewandowski 2010-10-04 08:04:06 UTC
Created attachment 171673 [details]
Bug in gedit 2.30.3
Comment 37 Marcin Lewandowski 2010-10-04 08:06:12 UTC
This bug is still present in gedit 2.30.3 (gtksourceview 2.10.4-0ubuntu1).

Please see attached screenshot and testcase.