summaryrefslogtreecommitdiff
path: root/pango/break-thai.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/break-thai.c')
-rw-r--r--pango/break-thai.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pango/break-thai.c b/pango/break-thai.c
index 5560c9fe..c9bf3e81 100644
--- a/pango/break-thai.c
+++ b/pango/break-thai.c
@@ -83,10 +83,15 @@ break_thai (const char *text,
/* find line break positions */
G_LOCK (th_brk);
- len = th_brk (tis_text, brk_pnts, len);
+ len = th_brk (tis_text, brk_pnts, cnt);
G_UNLOCK (th_brk);
for (cnt = 0; cnt < len; cnt++)
+ if (attrs[brk_pnts[cnt]].is_char_break)
{
+ /* Only allow additional line breaks if line-breaking is NOT
+ * prohibited. (The alternative would be to set is_char_break to
+ * TRUE as well. NOT setting it will break invariants that any
+ * line break opportunity is also a char break opportunity. */
attrs[brk_pnts[cnt]].is_line_break = TRUE;
attrs[brk_pnts[cnt]].is_word_start = TRUE;
attrs[brk_pnts[cnt]].is_word_end = TRUE;