Re: Bug 63401 - gtk_text_iter_inside_word () and gtk_text_iter_inside_sentence () are senceless?
- From: Havoc Pennington <hp redhat com>
- To: Vitaly Tishkov <tvv sparc spb su>
- Cc: gtk-devel-list gtk org
- Subject: Re: Bug 63401 - gtk_text_iter_inside_word () and gtk_text_iter_inside_sentence () are senceless?
- Date: 31 Oct 2001 10:10:30 -0500
Vitaly Tishkov <tvv sparc spb su> writes:
> Is the complete documentation of Pango word/sentence/line breaking algorithms
> available?
I think the docs I'd point to are just in this comment in
pango-break.h:
/* There are two ways to divide sentences. The first assigns all
* intersentence whitespace/control/format chars to some sentence,
* so all chars are in some sentence; is_sentence_boundary denotes
* the boundaries there. The second way doesn't assign
* between-sentence spaces, etc. to any sentence, so
* is_sentence_start/is_sentence_end mark the boundaries of those
* sentences.
*/
guint is_sentence_boundary : 1;
guint is_sentence_start : 1; /* first character in a sentence */
guint is_sentence_end : 1; /* first non-sentence char after a
sentence */
> Why Pango is designed to contradict to Unicode standard?
It doesn't contradict it, it provides additional information.
is_sentence_boundary corresponds to the Unicode
standard. is_sentence_start/is_sentence_end mark more intuitive
sentences with whitespace stripped off, but still using the Unicode
algorithm to find sentences. The text widget has convenience functions
using is_sentence_start/is_sentence_end because those are more useful
in most apps.
We should have this documented in the reference guide.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]