summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2012-12-02 18:05:35 +0200
committerBehdad Esfahbod <behdad@behdad.org>2012-12-02 18:09:40 +0200
commit816200e8b3221f630f424c167a3ee8ea4ebc4ba1 (patch)
tree931c10ec08b503c16c74877bd8d8b2837261d1da
parent3bb3a981e6eea19eaa9a5f9a347c78e691e11f96 (diff)
downloadpango-816200e8b3221f630f424c167a3ee8ea4ebc4ba1.tar.gz
Fix grapheme boundaries of surrogates and unassigned default ignorables
-rw-r--r--pango/break.c10
1 files changed, 10 insertions, 0 deletions
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;