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 308126 - GtkTextView in GTK_WRAP_WORD_CHAR does not break lines with ? symbols correctly
GtkTextView in GTK_WRAP_WORD_CHAR does not break lines with ? symbols correctly
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on: 97545
Blocks:
 
 
Reported: 2005-06-17 21:29 UTC by Eduardo M Kalinowski
Modified: 2018-05-22 12:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This small program shows the bug. (1.38 KB, text/x-csrc)
2005-06-17 21:30 UTC, Eduardo M Kalinowski
Details
Diagram of character wrap bug (87.15 KB, image/png)
2007-03-31 21:13 UTC, Justin
Details
Test-case program (8.08 KB, text/plain)
2007-03-31 21:15 UTC, Justin
Details

Description Eduardo M Kalinowski 2005-06-17 21:29:19 UTC
Please describe the problem:
In a GtkTextView in GTK_WRAP_WORD_CHAR mode, contained in a GtkScrolledWindow,
if there is a line with many "?" characters in sequence, with no space between
them, so many that the line does not fit the width, the line is not broken and
the horizontal scroll bar must be used to view the entire line.

Steps to reproduce:
1. I'll attach a small program showing the bug.

Actual results:
The line is not wrapped, being wider than the GtkTextView width.

Expected results:
The line should be broken even in the middle of the "word", I believe the
GTK_WRAP_WORD_CHAR mode means that lines will be broken even inside words if
necessary, so that horizontal scrolling is never necessary.

Does this happen every time?
Yes.

Other information:
Comment 1 Eduardo M Kalinowski 2005-06-17 21:30:24 UTC
Created attachment 47930 [details]
This small program shows the bug.
Comment 2 Mart Raudsepp 2006-04-25 14:10:12 UTC
Confirming on pango/gtk+ CVS HEAD.
I'm experiencing this problem in one of my applications as well. Pretty annoying if you want to be ensured that no horizontal scrollbar appears, but it still does.
I suspect the big row of question marks (or period marks, or quite some others) is considered one whole grapheme by pango?
Comment 3 Behdad Esfahbod 2006-04-26 02:58:31 UTC

*** This bug has been marked as a duplicate of 131625 ***
Comment 4 Owen Taylor 2007-03-31 20:29:58 UTC
To me, this isn't the same issue as 131625; 131625 is mostly about
white space and contains considerably discussion of the WRAP_WORD
case as well.

This bug is more simple ... the question is; does WRAP_CHAR mean:

 A) Break anywhere

Or

 B) Allow breaks inside words (in other words, use Asian-style line
    breaking for all languages.)

Apparently it means B), but I'm not sure when that's useful. If
it is useful, then we might want WRAP_ANYWHERE or something like
that as an API addition.
Comment 5 Justin 2007-03-31 21:12:11 UTC
Owen hit the core of my problem with his question.  I'd like to add a specific use-case concerning the chosen answer.

I'm attaching my test-case program and a diagram of my bug demonstrated with the test-case program.

Compile the test-case program with:
    gcc `pkg-config --cflags --libs gtk+-2.0` main.c

The test-case program uses a monospace font with PANGO_WRAP_CHAR to layout the entire paragraph of text.

Steps to recreate bug:
  1.  This bug is easily produced using the first line of text.  Any line lower
      makes this more difficult.

  2.  Resize the window so the first line ends with a period.  Many other
      punctuation marks reproduce this bug as well, but not all.

  3.  Now, resize the window so the period's checker cell is partially obscured.
      This will force the period to the next line.  The bug occurs when the
      period drags the single character before it to the next line, leaving an
      empty space at the end of the previous line.
Comment 6 Justin 2007-03-31 21:13:50 UTC
Created attachment 85624 [details]
Diagram of character wrap bug

Diagram demonstrates bug using subsequently attached test-case program.
Comment 7 Justin 2007-03-31 21:15:32 UTC
Created attachment 85625 [details]
Test-case program

Test-case program of PANGO_WRAP_CHAR bug.
Comment 8 Owen Taylor 2007-03-31 21:41:07 UTC
Moving to Pango
Comment 9 GNOME Infrastructure Team 2018-05-22 12:10:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/26.