From 816200e8b3221f630f424c167a3ee8ea4ebc4ba1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 2 Dec 2012 18:05:35 +0200 Subject: Fix grapheme boundaries of surrogates and unassigned default ignorables --- pango/break.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pango/break.c') diff --git a/pango/break.c b/pango/break.c index e8a97c1d..dd55edae 100644 --- a/pango/break.c +++ b/pango/break.c @@ -665,9 +665,19 @@ pango_default_break (const gchar *text, case G_UNICODE_CONTROL: case G_UNICODE_LINE_SEPARATOR: case G_UNICODE_PARAGRAPH_SEPARATOR: + case G_UNICODE_SURROGATE: GB_type = GB_ControlCRLF; break; + case G_UNICODE_UNASSIGNED: + /* Unassigned default ignorables */ + if ((wc >= 0xFFF0 && wc <= 0xFFF8) || + (wc >= 0xE0000 && wc <= 0xE0FFF)) + { + GB_type = GB_ControlCRLF; + break; + } + case G_UNICODE_OTHER_LETTER: if (makes_hangul_syllable) GB_type = GB_InHangulSyllable; -- cgit v1.2.1