[pango] Fix grapheme boundaries of surrogates and unassigned default ignorables
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Fix grapheme boundaries of surrogates and unassigned default ignorables
- Date: Sun, 2 Dec 2012 17:15:52 +0000 (UTC)
commit 816200e8b3221f630f424c167a3ee8ea4ebc4ba1
Author: Behdad Esfahbod <behdad behdad org>
Date: Sun Dec 2 18:05:35 2012 +0200
Fix grapheme boundaries of surrogates and unassigned default ignorables
pango/break.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/pango/break.c b/pango/break.c
index e8a97c1..dd55eda 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]