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 114483 - Add deletion boundaries to PangoLogAttr
Add deletion boundaries to PangoLogAttr
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.2.x
Other Linux
: Normal normal
: 1.4 API freeze
Assigned To: pango-maint
pango-maint
: 100809 (view as bug list)
Depends on:
Blocks: 107561 119891
 
 
Reported: 2003-06-05 14:10 UTC by Owen Taylor
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (turns on backspace_deletes_character except for latin, cyrillic and greek) (2.86 KB, patch)
2003-08-14 00:29 UTC, Noah Levitt
none Details | Review
patch as I'm about to apply it (4.21 KB, patch)
2003-08-14 16:31 UTC, Noah Levitt
none Details | Review

Description Owen Taylor 2003-06-05 14:10:04 UTC
There should be a bit in PangoLogAttr that indicates that when
deleting from the next grapheme boundary, that deletion should
stop at this position. Deleting whole graphemes is typically
too large.

The hard part of this is calculation of the positions. (Worth
checking for existing practice in ICU, etc.)

See bug 107561 for details.
Comment 1 Owen Taylor 2003-07-29 18:54:02 UTC
Rather than a separate boundary bit, I think better is
to have bit that you set on the grapheme position.

 guint backspace_deletes_character : 1;

The reason for this is that you want to delete one 
*decomposed* character, even if the text is using a 
pre-composed form. (Hangul being an example where this
is likely to come up.)
Comment 2 Owen Taylor 2003-07-31 13:56:19 UTC
*** Bug 100809 has been marked as a duplicate of this bug. ***
Comment 3 Noah Levitt 2003-08-13 05:57:12 UTC
It seems to me that this is a one line change, so we can commit it at
earliest convenience, right? No need to change the implementation for
1.4, imho. 
Comment 4 Owen Taylor 2003-08-13 15:27:11 UTC
I don't think it's interesting to add the attribute without
adding the implementation. If the implementation is hard,
we aren't going to get to it before 1.6 if it doesn't
make 1.4.0.

And this is actually a fairly serious problem for some
languages. 

Adding the attribute and a trivial implementation 
(say, backspace_deletes_character is set unless the base
character for the preceding grapheme is a Latin or 
Cyrillic character) shouldn't be that much work.

Comment 5 Noah Levitt 2003-08-13 16:22:31 UTC
My thought is that if we add the attribute for 1.4, then people will
have the opportunity to implement language engines with script_break
during the active life of 1.4, potentially getting it into one of the
point releases. Improving pango_default_break could be done for a
point release, too. I don't mean to punt prematurely, though. Duly
noted that something simple can be done for the default implementation.
Comment 6 Noah Levitt 2003-08-14 00:29:03 UTC
Created attachment 19204 [details] [review]
patch (turns on backspace_deletes_character except for latin, cyrillic and greek)
Comment 7 Owen Taylor 2003-08-14 14:05:59 UTC
Looks good, couple of small comments:

 * ! LATIN (wc) would be better as !LATIN (wc)

 * I'd really try to phrase:

+  /* if not set, backspace deletes a grapheme cluster */
   
   as a positive, not a negative. Maybe:

   /* if set, backspace deletes one character rather than
    * the entire grapheme cluster  
    */

 * Despite no other fields of PangoLogAttr being documented
   in the docs, I would like to see docs added for new
   additions, especially since the usage of this one is
   not that clear.

 * Before closing this bug, we need to open another for GTK+
   to add support for this to GtkEntry and GtkTextView.
Comment 8 Noah Levitt 2003-08-14 16:31:00 UTC
Created attachment 19218 [details] [review]
patch as I'm about to apply it
Comment 9 Noah Levitt 2003-08-14 16:34:38 UTC
2003-08-14  Noah Levitt  <nlevitt@columbia.edu>

	* docs/tmpl/main.sgml:
	* pango/break.c:
	* pango/pango-break.h: Add backspace_deletes_character to
        PangoLogAttr. (#114483)

P.S. Feel free to change the description in docs/tmpl/main.sgml. I
tried to make it clear, but I'm sure there's room for improvement.