diff options
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | pango/break.c | 43 | ||||
-rw-r--r-- | pango/pango-break-table.h | 718 | ||||
-rw-r--r-- | pango/pango-context.c | 18 | ||||
-rw-r--r-- | pango/pango-emoji-table.h | 79 | ||||
-rw-r--r-- | pango/pango-glyph-item.c | 11 | ||||
-rw-r--r-- | pango/pango-language.c | 2 | ||||
-rw-r--r-- | pango/pango-layout.c | 21 | ||||
-rw-r--r-- | pango/pango-markup.c | 50 | ||||
-rw-r--r-- | pango/pango-renderer.c | 13 | ||||
-rw-r--r-- | pango/pangocairo-fcfontmap.c | 2 | ||||
-rw-r--r-- | pango/pangofc-fontmap.c | 112 | ||||
-rw-r--r-- | pango/pangofc-shape.c | 4 | ||||
-rw-r--r-- | tests/GraphemeBreakTest.txt | 78 | ||||
-rw-r--r-- | tests/SentenceBreakTest.txt | 6 | ||||
-rw-r--r-- | tests/WordBreakTest.txt | 6 | ||||
-rw-r--r-- | tests/layouts/valid-6.expected | 25 | ||||
-rw-r--r-- | tests/layouts/valid-6.markup | 2 | ||||
-rw-r--r-- | tests/meson.build | 3 | ||||
-rw-r--r-- | tests/test-font.c | 69 | ||||
-rw-r--r-- | tests/test-shape.c | 4 | ||||
-rw-r--r-- | tests/testmisc.c | 112 | ||||
-rwxr-xr-x | tools/gen-break-table.py | 27 |
23 files changed, 984 insertions, 425 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3758c576..317285da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/base:latest +image: registry.fedoraproject.org/fedora:32 stages: - build @@ -6,11 +6,13 @@ stages: gnome-runtime-linux: stage: build before_script: + - dnf update -y - > dnf install -y \ glibc-langpack-en \ gcc \ gcc-c++ \ + diffutils \ meson \ redhat-rpm-config \ glib2-devel \ diff --git a/pango/break.c b/pango/break.c index ca62a28f..5aa9d41e 100644 --- a/pango/break.c +++ b/pango/break.c @@ -398,9 +398,8 @@ pango_default_break (const gchar *text, wc == 0x6DD || wc == 0x70F || wc == 0x8E2 || - wc == 0xD4E || wc == 0x110BD || - (wc >= 0x111C2 && wc <= 0x111C3))) + wc == 0x110CD)) { GB_type = GB_Prepend; break; @@ -426,6 +425,10 @@ pango_default_break (const gchar *text, case G_UNICODE_OTHER_LETTER: if (makes_hangul_syllable) GB_type = GB_InHangulSyllable; + + if (_pango_is_Consonant_Preceding_Repha (wc) || + _pango_is_Consonant_Prefixed (wc)) + GB_type = GB_Prepend; break; case G_UNICODE_MODIFIER_LETTER: @@ -570,7 +573,7 @@ pango_default_break (const gchar *text, WB_type = WB_ExtendFormat; /* Other_Grapheme_Extend */ break; case 0x05: - if (wc == 0x05F3) + if (wc == 0x058A) WB_type = WB_ALetter; /* ALetter exceptions */ break; } @@ -617,12 +620,16 @@ pango_default_break (const gchar *text, WB_type = WB_MidNumLet; /* MidNumLet */ break; case G_UNICODE_OTHER_PUNCTUATION: - if (wc == 0x0027 || wc == 0x002e || wc == 0x2024 || + if ((wc >= 0x055a && wc <= 0x055c) || + wc == 0x055e || wc == 0x05f3) + WB_type = WB_ALetter; /* ALetter */ + else if (wc == 0x0027 || wc == 0x002e || wc == 0x2024 || wc == 0xfe52 || wc == 0xff07 || wc == 0xff0e) WB_type = WB_MidNumLet; /* MidNumLet */ - else if (wc == 0x00b7 || wc == 0x05f4 || wc == 0x2027 || wc == 0x003a || wc == 0x0387 || + else if (wc == 0x00b7 || wc == 0x05f4 || wc == 0x2027 || + wc == 0x003a || wc == 0x0387 || wc == 0x055f || wc == 0xfe13 || wc == 0xfe55 || wc == 0xff1a) - WB_type = WB_MidLetter; /* WB_MidLetter */ + WB_type = WB_MidLetter; /* MidLetter */ else if (wc == 0x066c || wc == 0xfe50 || wc == 0xfe54 || wc == 0xff0c || wc == 0xff1b) WB_type = WB_MidNum; /* MidNum */ @@ -1074,10 +1081,12 @@ pango_default_break (const gchar *text, if ((prev_break_type == G_UNICODE_BREAK_ALPHABETIC || prev_break_type == G_UNICODE_BREAK_HEBREW_LETTER || prev_break_type == G_UNICODE_BREAK_NUMERIC) && - break_type == G_UNICODE_BREAK_OPEN_PUNCTUATION) + break_type == G_UNICODE_BREAK_OPEN_PUNCTUATION && + !_pango_is_EastAsianWide (wc)) break_op = BREAK_PROHIBITED; if (prev_break_type == G_UNICODE_BREAK_CLOSE_PARANTHESIS && + !_pango_is_EastAsianWide (prev_wc)&& (break_type == G_UNICODE_BREAK_ALPHABETIC || break_type == G_UNICODE_BREAK_HEBREW_LETTER || break_type == G_UNICODE_BREAK_NUMERIC)) @@ -1219,25 +1228,7 @@ pango_default_break (const gchar *text, /* Rule LB22 */ if (break_type == G_UNICODE_BREAK_INSEPARABLE) - { - if (prev_break_type == G_UNICODE_BREAK_ALPHABETIC || - prev_break_type == G_UNICODE_BREAK_HEBREW_LETTER) - break_op = BREAK_PROHIBITED; - - if (prev_break_type == G_UNICODE_BREAK_EXCLAMATION) - break_op = BREAK_PROHIBITED; - - if (prev_break_type == G_UNICODE_BREAK_IDEOGRAPHIC || - prev_break_type == G_UNICODE_BREAK_EMOJI_BASE || - prev_break_type == G_UNICODE_BREAK_EMOJI_MODIFIER) - break_op = BREAK_PROHIBITED; - - if (prev_break_type == G_UNICODE_BREAK_INSEPARABLE) - break_op = BREAK_PROHIBITED; - - if (prev_break_type == G_UNICODE_BREAK_NUMERIC) - break_op = BREAK_PROHIBITED; - } + break_op = BREAK_PROHIBITED; if (break_type == G_UNICODE_BREAK_AFTER || break_type == G_UNICODE_BREAK_HYPHEN || diff --git a/pango/pango-break-table.h b/pango/pango-break-table.h index 2361ede5..c587fd5a 100644 --- a/pango/pango-break-table.h +++ b/pango/pango-break-table.h @@ -2,22 +2,21 @@ /* * The following tables are generated by running: * - * ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt | indent + * ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt EastAsianWidth.txt | indent * * on files with these headers: * - * # SentenceBreakProperty-11.0.0.txt - * # Date: 2018-03-15, 04:28:45 GMT - * # © 2018 Unicode®, Inc. + * # SentenceBreakProperty-13.0.0.txt + * # Date: 2019-11-27, 03:13:39 GMT + * # © 2019 Unicode®, Inc. * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. * # For terms of use, see http://www.unicode.org/terms_of_use.html * # * # Unicode Character Database * # For documentation, see http://www.unicode.org/reports/tr44/ - * - * # IndicSyllabicCategory-11.0.0.txt - * # Date: 2018-05-21, 18:33:00 GMT [KW, RP] - * # © 2018 Unicode®, Inc. + * # IndicSyllabicCategory-13.0.0.txt + * # Date: 2019-07-22, 19:55:00 GMT [KW, RP] + * # © 2019 Unicode®, Inc. * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. * # For terms of use, see http://www.unicode.org/terms_of_use.html * # @@ -53,20 +52,62 @@ * # Indic_Syllabic_Category are the following: * # * # Ahom, Balinese, Batak, Bengali, Bhaiksuki, Brahmi, Buginese, Buhid, - * # Chakma, Cham, Devanagari, Dogra, Grantha, Gujarati, Gunjala Gondi, - * # Gurmukhi, Hanunoo, Javanese, Kaithi, Kannada, Kayah Li, Kharoshthi, - * # Khmer, Khojki, Khudawadi, Lao, Lepcha, Limbu, Mahajani, Makasar, - * # Malayalam, Marchen, Masaram Gondi, Meetei Mayek, Modi, Multani, - * # Myanmar, Newa, New Tai Lue, Oriya, Phags-pa, Rejang, Saurashtra, - * # Sharada, Siddham, Sinhala, Soyombo, Sundanese, Syloti Nagri, - * # Tagalog, Tagbanwa, Tai Le, Tai Tham, Tai Viet, Takri, Tamil, - * # Telugu, Thai, Tibetan, Tirhuta, and Zanabazar Square. + * # Chakma, Cham, Devanagari, Dives Akuru, Dogra, Grantha, Gujarati, + * # Gunjala Gondi, Gurmukhi, Hanunoo, Javanese, Kaithi, Kannada, + * # Kayah Li, Kharoshthi, Khmer, Khojki, Khudawadi, Lao, Lepcha, Limbu, + * # Mahajani, Makasar, Malayalam, Marchen, Masaram Gondi, Meetei Mayek, + * # Modi, Multani, Myanmar, Nandinagari, Newa, New Tai Lue, Oriya, + * # Phags-pa, Rejang, Saurashtra, Sharada, Siddham, Sinhala, Soyombo, + * # Sundanese, Syloti Nagri, Tagalog, Tagbanwa, Tai Le, Tai Tham, + * # Tai Viet, Takri, Tamil, Telugu, Thai, Tibetan, Tirhuta, and + * # Zanabazar Square. * # * # All characters for all other scripts not in that list * # take the default value for this property, unless they * # are individually listed in this data file. * # - * + * # EastAsianWidth-13.0.0.txt + * # Date: 2029-01-21, 18:14:00 GMT [KW, LI] + * # © 2020 Unicode®, Inc. + * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. + * # For terms of use, see http://www.unicode.org/terms_of_use.html + * # + * # Unicode Character Database + * # For documentation, see http://www.unicode.org/reports/tr44/ + * # + * # East_Asian_Width Property + * # + * # This file is a normative contributory data file in the + * # Unicode Character Database. + * # + * # The format is two fields separated by a semicolon. + * # Field 0: Unicode code point value or range of code point values + * # Field 1: East_Asian_Width property, consisting of one of the following values: + * # "A", "F", "H", "N", "Na", "W" + * # - All code points, assigned or unassigned, that are not listed + * # explicitly are given the value "N". + * # - The unassigned code points in the following blocks default to "W": + * # CJK Unified Ideographs Extension A: U+3400..U+4DBF + * # CJK Unified Ideographs: U+4E00..U+9FFF + * # CJK Compatibility Ideographs: U+F900..U+FAFF + * # - All undesignated code points in Planes 2 and 3, whether inside or + * # outside of allocated blocks, default to "W": + * # Plane 2: U+20000..U+2FFFD + * # Plane 3: U+30000..U+3FFFD + * # + * # Character ranges are specified as for other property files in the + * # Unicode Character Database. + * # + * # For legacy reasons, there are no spaces before or after the semicolon + * # which separates the two fields. The comments following the number sign + * # "#" list the General_Category property value or the L& alias of the + * # derived value LC, the Unicode character name or names, and, in lines + * # with ranges of code points, the code point count in square brackets. + * # + * # For more information, see UAX #11: East Asian Width, + * # at http://www.unicode.org/reports/tr11/ + * # + * # @missing: 0000..10FFFF; N */ #ifndef PANGO_BREAK_TABLE_H @@ -78,112 +119,130 @@ static inline gboolean _pango_is_STerm (gunichar wc) { - if ((wc >= 0x0021 && wc <= 0x1803)) + if ((wc >= 0x0021 && wc <= 0x1809)) { if (wc == 0x0021 || wc == 0x003F || wc == 0x0589 || (wc >= 0x061E && wc <= 0x061F)) return TRUE; - if (wc == 0x06D4 || - (wc >= 0x0700 && wc <= 0x0702) || wc == 0x07F9 || wc == 0x0837) - return TRUE; - if (wc == 0x0839 || - (wc >= 0x083D && wc <= 0x083E) || - (wc >= 0x0964 && wc <= 0x0965) || (wc >= 0x104A && wc <= 0x104B)) - return TRUE; - if ((wc >= 0x1362 && wc <= 0x1803)) + if ((wc >= 0x06D4 && wc <= 0x0839)) { - if (wc == 0x1362) + if (wc == 0x06D4) + return TRUE; + if ((wc >= 0x0700 && wc <= 0x0702)) + return TRUE; + if (wc == 0x07F9) return TRUE; + if (wc == 0x0837 || wc == 0x0839) + return TRUE; + return FALSE; + } + if ((wc >= 0x083D && wc <= 0x083E) || + (wc >= 0x0964 && wc <= 0x0965) || + (wc >= 0x104A && wc <= 0x104B) || wc == 0x1362) + return TRUE; + if ((wc >= 0x1367 && wc <= 0x1809)) + { if ((wc >= 0x1367 && wc <= 0x1368)) return TRUE; if (wc == 0x166E) return TRUE; - if ((wc >= 0x1735 && wc <= 0x1736) || wc == 0x1803) + if ((wc >= 0x1735 && wc <= 0x1736)) + return TRUE; + if (wc == 0x1803 || wc == 0x1809) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x1809 && wc <= 0xA8CF)) + if ((wc >= 0x1944 && wc <= 0xA92F)) { - if (wc == 0x1809 || - (wc >= 0x1944 && wc <= 0x1945) || - (wc >= 0x1AA8 && wc <= 0x1AAB) || (wc >= 0x1B5A && wc <= 0x1B5B)) + if ((wc >= 0x1944 && wc <= 0x1945) || + (wc >= 0x1AA8 && wc <= 0x1AAB) || + (wc >= 0x1B5A && wc <= 0x1B5B) || (wc >= 0x1B5E && wc <= 0x1B5F)) return TRUE; - if ((wc >= 0x1B5E && wc <= 0x2049)) + if ((wc >= 0x1C3B && wc <= 0x2E2E)) { - if ((wc >= 0x1B5E && wc <= 0x1B5F)) - return TRUE; if ((wc >= 0x1C3B && wc <= 0x1C3C)) return TRUE; if ((wc >= 0x1C7E && wc <= 0x1C7F)) return TRUE; - if ((wc >= 0x203C && wc <= 0x203D) || - (wc >= 0x2047 && wc <= 0x2049)) + if ((wc >= 0x203C && wc <= 0x203D)) + return TRUE; + if ((wc >= 0x2047 && wc <= 0x2049) || wc == 0x2E2E) return TRUE; return FALSE; } - if (wc == 0x2E2E || wc == 0x2E3C || wc == 0x3002 || wc == 0xA4FF) + if (wc == 0x2E3C || + wc == 0x3002 || wc == 0xA4FF || (wc >= 0xA60E && wc <= 0xA60F)) return TRUE; - if ((wc >= 0xA60E && wc <= 0xA8CF)) + if ((wc >= 0xA6F3 && wc <= 0xA92F)) { - if ((wc >= 0xA60E && wc <= 0xA60F)) - return TRUE; if (wc == 0xA6F3) return TRUE; if (wc == 0xA6F7) return TRUE; - if ((wc >= 0xA876 && wc <= 0xA877) || - (wc >= 0xA8CE && wc <= 0xA8CF)) + if ((wc >= 0xA876 && wc <= 0xA877)) + return TRUE; + if ((wc >= 0xA8CE && wc <= 0xA8CF) || wc == 0xA92F) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0xA92F && wc <= 0x111DF)) + if ((wc >= 0xA9C8 && wc <= 0x1123C)) { - if (wc == 0xA92F || - (wc >= 0xA9C8 && wc <= 0xA9C9) || - (wc >= 0xAA5D && wc <= 0xAA5F) || (wc >= 0xAAF0 && wc <= 0xAAF1)) - return TRUE; - if (wc == 0xABEB || - (wc >= 0xFE56 && wc <= 0xFE57) || wc == 0xFF01 || wc == 0xFF1F) + if ((wc >= 0xA9C8 && wc <= 0xA9C9) || + (wc >= 0xAA5D && wc <= 0xAA5F) || + (wc >= 0xAAF0 && wc <= 0xAAF1) || wc == 0xABEB) return TRUE; - if (wc == 0xFF61 || - (wc >= 0x10A56 && wc <= 0x10A57) || - (wc >= 0x10F55 && wc <= 0x10F59) || - (wc >= 0x11047 && wc <= 0x11048)) - return TRUE; - if ((wc >= 0x110BE && wc <= 0x111DF)) + if ((wc >= 0xFE56 && wc <= 0x10A57)) { - if ((wc >= 0x110BE && wc <= 0x110C1)) + if ((wc >= 0xFE56 && wc <= 0xFE57)) + return TRUE; + if (wc == 0xFF01) + return TRUE; + if (wc == 0xFF1F) return TRUE; - if ((wc >= 0x11141 && wc <= 0x11143)) + if (wc == 0xFF61 || (wc >= 0x10A56 && wc <= 0x10A57)) return TRUE; + return FALSE; + } + if ((wc >= 0x10F55 && wc <= 0x10F59) || + (wc >= 0x11047 && wc <= 0x11048) || + (wc >= 0x110BE && wc <= 0x110C1) || + (wc >= 0x11141 && wc <= 0x11143)) + return TRUE; + if ((wc >= 0x111C5 && wc <= 0x1123C)) + { if ((wc >= 0x111C5 && wc <= 0x111C6)) return TRUE; - if (wc == 0x111CD || (wc >= 0x111DE && wc <= 0x111DF)) + if (wc == 0x111CD) + return TRUE; + if ((wc >= 0x111DE && wc <= 0x111DF)) + return TRUE; + if ((wc >= 0x11238 && wc <= 0x11239) || + (wc >= 0x1123B && wc <= 0x1123C)) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x11238 && wc <= 0x1DA88)) + if ((wc >= 0x112A9 && wc <= 0x1DA88)) { - if ((wc >= 0x11238 && wc <= 0x11239) || - (wc >= 0x1123B && wc <= 0x1123C) || - wc == 0x112A9 || (wc >= 0x1144B && wc <= 0x1144C)) + if (wc == 0x112A9 || + (wc >= 0x1144B && wc <= 0x1144C) || + (wc >= 0x115C2 && wc <= 0x115C3) || + (wc >= 0x115C9 && wc <= 0x115D7)) return TRUE; - if ((wc >= 0x115C2 && wc <= 0x11A43)) + if ((wc >= 0x11641 && wc <= 0x11A43)) { - if ((wc >= 0x115C2 && wc <= 0x115C3)) + if ((wc >= 0x11641 && wc <= 0x11642)) return TRUE; - if ((wc >= 0x115C9 && wc <= 0x115D7)) + if ((wc >= 0x1173C && wc <= 0x1173E)) return TRUE; - if ((wc >= 0x11641 && wc <= 0x11642)) + if (wc == 0x11944) return TRUE; - if ((wc >= 0x1173C && wc <= 0x1173E) || - (wc >= 0x11A42 && wc <= 0x11A43)) + if (wc == 0x11946 || (wc >= 0x11A42 && wc <= 0x11A43)) return TRUE; return FALSE; } @@ -232,7 +291,7 @@ _pango_is_Virama (gunichar wc) return TRUE; if (wc == 0x0DCA) return TRUE; - if (wc == 0x1B44 || wc == 0xA8C4) + if (wc == 0x1B44 || wc == 0xA806 || wc == 0xA8C4) return TRUE; return FALSE; } @@ -250,13 +309,13 @@ _pango_is_Virama (gunichar wc) } if ((wc >= 0x11442 && wc <= 0x11C3F)) { - if (wc == 0x11442) + if (wc == 0x11442 || wc == 0x114C2) return TRUE; - if (wc == 0x114C2 || wc == 0x115BF) + if (wc == 0x115BF || wc == 0x1163F) return TRUE; - if (wc == 0x1163F) + if (wc == 0x116B6 || wc == 0x11839) return TRUE; - if (wc == 0x116B6 || wc == 0x11839 || wc == 0x11C3F) + if (wc == 0x119E0 || wc == 0x11C3F) return TRUE; return FALSE; } @@ -266,258 +325,257 @@ _pango_is_Virama (gunichar wc) static inline gboolean _pango_is_Vowel_Dependent (gunichar wc) { - if ((wc >= 0x093A && wc <= 0x0C63)) + if ((wc >= 0x093A && wc <= 0x0CC8)) { - if ((wc >= 0x093A && wc <= 0x09C8)) + if ((wc >= 0x093A && wc <= 0x09CC)) { - if ((wc >= 0x093A && wc <= 0x093B)) - return TRUE; - if ((wc >= 0x093E && wc <= 0x094C) || - (wc >= 0x094E && wc <= 0x094F)) + if ((wc >= 0x093A && wc <= 0x093B) || + (wc >= 0x093E && wc <= 0x094C)) return TRUE; - if ((wc >= 0x0955 && wc <= 0x0957)) + if ((wc >= 0x094E && wc <= 0x094F) || + (wc >= 0x0955 && wc <= 0x0957)) return TRUE; if ((wc >= 0x0962 && wc <= 0x0963) || - (wc >= 0x09BE && wc <= 0x09C4) || - (wc >= 0x09C7 && wc <= 0x09C8)) + (wc >= 0x09BE && wc <= 0x09C4)) + return TRUE; + if ((wc >= 0x09C7 && wc <= 0x09C8) || + (wc >= 0x09CB && wc <= 0x09CC)) return TRUE; return FALSE; } - if ((wc >= 0x09CB && wc <= 0x0AC9)) + if ((wc >= 0x09D7 && wc <= 0x0ACC)) { - if ((wc >= 0x09CB && wc <= 0x09CC) || wc == 0x09D7) + if (wc == 0x09D7 || (wc >= 0x09E2 && wc <= 0x09E3)) return TRUE; - if ((wc >= 0x09E2 && wc <= 0x09E3) || - (wc >= 0x0A3E && wc <= 0x0A42)) + if ((wc >= 0x0A3E && wc <= 0x0A42) || + (wc >= 0x0A47 && wc <= 0x0A48)) return TRUE; - if ((wc >= 0x0A47 && wc <= 0x0A48) || - (wc >= 0x0A4B && wc <= 0x0A4C)) + if ((wc >= 0x0A4B && wc <= 0x0A4C) || + (wc >= 0x0ABE && wc <= 0x0AC5)) return TRUE; - if ((wc >= 0x0ABE && wc <= 0x0AC5) || - (wc >= 0x0AC7 && wc <= 0x0AC9)) + if ((wc >= 0x0AC7 && wc <= 0x0AC9) || + (wc >= 0x0ACB && wc <= 0x0ACC)) return TRUE; return FALSE; } - if ((wc >= 0x0ACB && wc <= 0x0B63)) + if ((wc >= 0x0AE2 && wc <= 0x0BC8)) { - if ((wc >= 0x0ACB && wc <= 0x0ACC)) - return TRUE; if ((wc >= 0x0AE2 && wc <= 0x0AE3) || (wc >= 0x0B3E && wc <= 0x0B44)) return TRUE; - if ((wc >= 0x0B47 && wc <= 0x0B48)) + if ((wc >= 0x0B47 && wc <= 0x0B48) || + (wc >= 0x0B4B && wc <= 0x0B4C)) return TRUE; - if ((wc >= 0x0B4B && wc <= 0x0B4C) || - (wc >= 0x0B56 && wc <= 0x0B57) || + if ((wc >= 0x0B55 && wc <= 0x0B57) || (wc >= 0x0B62 && wc <= 0x0B63)) return TRUE; - return FALSE; - } - if ((wc >= 0x0BBE && wc <= 0x0C63)) - { if ((wc >= 0x0BBE && wc <= 0x0BC2) || (wc >= 0x0BC6 && wc <= 0x0BC8)) return TRUE; + return FALSE; + } + if ((wc >= 0x0BCA && wc <= 0x0CC8)) + { if ((wc >= 0x0BCA && wc <= 0x0BCC) || wc == 0x0BD7) return TRUE; if ((wc >= 0x0C3E && wc <= 0x0C44) || (wc >= 0x0C46 && wc <= 0x0C48)) return TRUE; if ((wc >= 0x0C4A && wc <= 0x0C4C) || - (wc >= 0x0C55 && wc <= 0x0C56) || - (wc >= 0x0C62 && wc <= 0x0C63)) + (wc >= 0x0C55 && wc <= 0x0C56)) + return TRUE; + if ((wc >= 0x0C62 && wc <= 0x0C63) || + (wc >= 0x0CBE && wc <= 0x0CC4) || + (wc >= 0x0CC6 && wc <= 0x0CC8)) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x0CBE && wc <= 0x1733)) + if ((wc >= 0x0CCA && wc <= 0x17C8)) { - if ((wc >= 0x0CBE && wc <= 0x0D48)) + if ((wc >= 0x0CCA && wc <= 0x0D63)) { - if ((wc >= 0x0CBE && wc <= 0x0CC4)) + if ((wc >= 0x0CCA && wc <= 0x0CCC) || + (wc >= 0x0CD5 && wc <= 0x0CD6)) return TRUE; - if ((wc >= 0x0CC6 && wc <= 0x0CC8) || - (wc >= 0x0CCA && wc <= 0x0CCC)) + if ((wc >= 0x0CE2 && wc <= 0x0CE3) || + (wc >= 0x0D3E && wc <= 0x0D44)) return TRUE; - if ((wc >= 0x0CD5 && wc <= 0x0CD6)) + if ((wc >= 0x0D46 && wc <= 0x0D48) || + (wc >= 0x0D4A && wc <= 0x0D4C)) return TRUE; - if ((wc >= 0x0CE2 && wc <= 0x0CE3) || - (wc >= 0x0D3E && wc <= 0x0D44) || - (wc >= 0x0D46 && wc <= 0x0D48)) + if (wc == 0x0D57 || (wc >= 0x0D62 && wc <= 0x0D63)) return TRUE; return FALSE; } - if ((wc >= 0x0D4A && wc <= 0x0E39)) + if ((wc >= 0x0DCF && wc <= 0x0EB9)) { - if ((wc >= 0x0D4A && wc <= 0x0D4C) || wc == 0x0D57) + if ((wc >= 0x0DCF && wc <= 0x0DD4) || wc == 0x0DD6) return TRUE; - if ((wc >= 0x0D62 && wc <= 0x0D63) || - (wc >= 0x0DCF && wc <= 0x0DD4)) + if ((wc >= 0x0DD8 && wc <= 0x0DDF) || + (wc >= 0x0DF2 && wc <= 0x0DF3)) return TRUE; - if (wc == 0x0DD6 || (wc >= 0x0DD8 && wc <= 0x0DDF)) + if ((wc >= 0x0E30 && wc <= 0x0E39) || + (wc >= 0x0E40 && wc <= 0x0E45)) return TRUE; - if ((wc >= 0x0DF2 && wc <= 0x0DF3) || - (wc >= 0x0E30 && wc <= 0x0E39)) + if (wc == 0x0E47 || (wc >= 0x0EB0 && wc <= 0x0EB9)) return TRUE; return FALSE; } - if ((wc >= 0x0E40 && wc <= 0x0F81)) + if ((wc >= 0x0EBB && wc <= 0x1068)) { - if ((wc >= 0x0E40 && wc <= 0x0E45)) + if (wc == 0x0EBB || (wc >= 0x0EC0 && wc <= 0x0EC4)) return TRUE; - if (wc == 0x0E47 || (wc >= 0x0EB0 && wc <= 0x0EB9)) - return TRUE; - if (wc == 0x0EBB) - return TRUE; - if ((wc >= 0x0EC0 && wc <= 0x0EC4) || - (wc >= 0x0F71 && wc <= 0x0F7D) || + if ((wc >= 0x0F71 && wc <= 0x0F7D) || (wc >= 0x0F80 && wc <= 0x0F81)) return TRUE; - return FALSE; - } - if ((wc >= 0x102B && wc <= 0x1733)) - { if ((wc >= 0x102B && wc <= 0x1035) || (wc >= 0x1056 && wc <= 0x1059)) return TRUE; if (wc == 0x1062 || (wc >= 0x1067 && wc <= 0x1068)) return TRUE; + return FALSE; + } + if ((wc >= 0x1071 && wc <= 0x17C8)) + { if ((wc >= 0x1071 && wc <= 0x1074) || (wc >= 0x1083 && wc <= 0x1086)) return TRUE; if ((wc >= 0x109C && wc <= 0x109D) || - (wc >= 0x1712 && wc <= 0x1713) || - (wc >= 0x1732 && wc <= 0x1733)) + (wc >= 0x1712 && wc <= 0x1713)) + return TRUE; + if ((wc >= 0x1732 && wc <= 0x1733) || + (wc >= 0x1752 && wc <= 0x1753)) + return TRUE; + if ((wc >= 0x1772 && wc <= 0x1773) || + (wc >= 0x17B6 && wc <= 0x17C5) || wc == 0x17C8) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x1752 && wc <= 0x111BF)) + if ((wc >= 0x1920 && wc <= 0x11344)) { - if ((wc >= 0x1752 && wc <= 0x19C0)) + if ((wc >= 0x1920 && wc <= 0x1BEF)) { - if ((wc >= 0x1752 && wc <= 0x1753)) + if ((wc >= 0x1920 && wc <= 0x1928) || wc == 0x193A) return TRUE; - if ((wc >= 0x1772 && wc <= 0x1773) || - (wc >= 0x17B6 && wc <= 0x17C5)) + if ((wc >= 0x19B0 && wc <= 0x19C0) || + (wc >= 0x1A17 && wc <= 0x1A1B)) return TRUE; - if (wc == 0x17C8) + if ((wc >= 0x1A61 && wc <= 0x1A73) || + (wc >= 0x1B35 && wc <= 0x1B43)) return TRUE; - if ((wc >= 0x1920 && wc <= 0x1928) || - wc == 0x193A || (wc >= 0x19B0 && wc <= 0x19C0)) + if ((wc >= 0x1BA4 && wc <= 0x1BA9) || + (wc >= 0x1BE7 && wc <= 0x1BEF)) return TRUE; return FALSE; } - if ((wc >= 0x1A17 && wc <= 0xA8C3)) + if ((wc >= 0x1C26 && wc <= 0xA9E5)) { - if ((wc >= 0x1A17 && wc <= 0x1A1B) || - (wc >= 0x1A61 && wc <= 0x1A73)) - return TRUE; - if ((wc >= 0x1B35 && wc <= 0x1B43) || - (wc >= 0x1BA4 && wc <= 0x1BA9)) - return TRUE; - if ((wc >= 0x1BE7 && wc <= 0x1BEF) || - (wc >= 0x1C26 && wc <= 0x1C2C)) + if ((wc >= 0x1C26 && wc <= 0x1C2C) || wc == 0xA802) return TRUE; if ((wc >= 0xA823 && wc <= 0xA827) || (wc >= 0xA8B5 && wc <= 0xA8C3)) return TRUE; + if (wc == 0xA8FF || (wc >= 0xA947 && wc <= 0xA94E)) + return TRUE; + if ((wc >= 0xA9B4 && wc <= 0xA9BC) || wc == 0xA9E5) + return TRUE; return FALSE; } - if ((wc >= 0xA8FF && wc <= 0xAAEF)) + if ((wc >= 0xAA29 && wc <= 0x11045)) { - if (wc == 0xA8FF) + if ((wc >= 0xAA29 && wc <= 0xAA32) || + (wc >= 0xAAB0 && wc <= 0xAABE)) return TRUE; - if ((wc >= 0xA947 && wc <= 0xA94E) || - (wc >= 0xA9B4 && wc <= 0xA9BC)) + if ((wc >= 0xAAEB && wc <= 0xAAEF) || + (wc >= 0xABE3 && wc <= 0xABEA)) return TRUE; - if (wc == 0xA9E5) + if ((wc >= 0x10A01 && wc <= 0x10A03) || + (wc >= 0x10A05 && wc <= 0x10A06)) return TRUE; - if ((wc >= 0xAA29 && wc <= 0xAA32) || - (wc >= 0xAAB0 && wc <= 0xAABE) || - (wc >= 0xAAEB && wc <= 0xAAEF)) + if ((wc >= 0x10A0C && wc <= 0x10A0D) || + (wc >= 0x11038 && wc <= 0x11045)) return TRUE; return FALSE; } - if ((wc >= 0xABE3 && wc <= 0x111BF)) + if ((wc >= 0x110B0 && wc <= 0x11344)) { - if ((wc >= 0xABE3 && wc <= 0xABEA) || - (wc >= 0x10A01 && wc <= 0x10A03)) + if ((wc >= 0x110B0 && wc <= 0x110B8) || + (wc >= 0x11127 && wc <= 0x11132)) return TRUE; - if ((wc >= 0x10A05 && wc <= 0x10A06) || - (wc >= 0x10A0C && wc <= 0x10A0D)) + if ((wc >= 0x11145 && wc <= 0x11146) || + (wc >= 0x111B3 && wc <= 0x111BF)) return TRUE; - if ((wc >= 0x11038 && wc <= 0x11045) || - (wc >= 0x110B0 && wc <= 0x110B8)) + if ((wc >= 0x111CB && wc <= 0x111CC) || wc == 0x111CE) return TRUE; - if ((wc >= 0x11127 && wc <= 0x11132) || - (wc >= 0x11145 && wc <= 0x11146) || - (wc >= 0x111B3 && wc <= 0x111BF)) + if ((wc >= 0x1122C && wc <= 0x11233) || + (wc >= 0x112E0 && wc <= 0x112E8) || + (wc >= 0x1133E && wc <= 0x11344)) return TRUE; return FALSE; } return FALSE; } - if ((wc >= 0x111CB && wc <= 0x11EF6)) + if ((wc >= 0x11347 && wc <= 0x11EF6)) { - if ((wc >= 0x111CB && wc <= 0x11363)) + if ((wc >= 0x11347 && wc <= 0x115BB)) { - if ((wc >= 0x111CB && wc <= 0x111CC) || - (wc >= 0x1122C && wc <= 0x11233)) - return TRUE; - if ((wc >= 0x112E0 && wc <= 0x112E8) || - (wc >= 0x1133E && wc <= 0x11344)) - return TRUE; if ((wc >= 0x11347 && wc <= 0x11348) || (wc >= 0x1134B && wc <= 0x1134C)) return TRUE; if (wc == 0x11357 || (wc >= 0x11362 && wc <= 0x11363)) return TRUE; - return FALSE; - } - if ((wc >= 0x11435 && wc <= 0x116B5)) - { if ((wc >= 0x11435 && wc <= 0x11441) || (wc >= 0x114B0 && wc <= 0x114BE)) return TRUE; if ((wc >= 0x115AF && wc <= 0x115B5) || (wc >= 0x115B8 && wc <= 0x115BB)) return TRUE; + return FALSE; + } + if ((wc >= 0x115DC && wc <= 0x11938)) + { if ((wc >= 0x115DC && wc <= 0x115DD) || (wc >= 0x11630 && wc <= 0x1163C)) return TRUE; if (wc == 0x11640 || (wc >= 0x116AD && wc <= 0x116B5)) return TRUE; + if ((wc >= 0x11720 && wc <= 0x1172A) || + (wc >= 0x1182C && wc <= 0x11836)) + return TRUE; + if ((wc >= 0x11930 && wc <= 0x11935) || + (wc >= 0x11937 && wc <= 0x11938)) + return TRUE; return FALSE; } - if ((wc >= 0x11720 && wc <= 0x11D36)) + if ((wc >= 0x119D1 && wc <= 0x11CB4)) { - if ((wc >= 0x11720 && wc <= 0x1172A) || - (wc >= 0x1182C && wc <= 0x11836)) + if ((wc >= 0x119D1 && wc <= 0x119D7) || + (wc >= 0x119DA && wc <= 0x119DD)) return TRUE; - if ((wc >= 0x11A01 && wc <= 0x11A0A) || - (wc >= 0x11A51 && wc <= 0x11A5B)) + if (wc == 0x119E4 || (wc >= 0x11A01 && wc <= 0x11A0A)) return TRUE; - if ((wc >= 0x11C2F && wc <= 0x11C36) || - (wc >= 0x11C38 && wc <= 0x11C3B)) + if ((wc >= 0x11A51 && wc <= 0x11A5B) || + (wc >= 0x11C2F && wc <= 0x11C36)) return TRUE; - if ((wc >= 0x11CB0 && wc <= 0x11CB4) || - (wc >= 0x11D31 && wc <= 0x11D36)) + if ((wc >= 0x11C38 && wc <= 0x11C3B) || + (wc >= 0x11CB0 && wc <= 0x11CB4)) return TRUE; return FALSE; } - if ((wc >= 0x11D3A && wc <= 0x11EF6)) + if ((wc >= 0x11D31 && wc <= 0x11EF6)) { - if (wc == 0x11D3A || (wc >= 0x11D3C && wc <= 0x11D3D)) + if ((wc >= 0x11D31 && wc <= 0x11D36) || wc == 0x11D3A) return TRUE; - if (wc == 0x11D3F || wc == 0x11D43) + if ((wc >= 0x11D3C && wc <= 0x11D3D) || wc == 0x11D3F) return TRUE; - if ((wc >= 0x11D8A && wc <= 0x11D8E) || - (wc >= 0x11D90 && wc <= 0x11D91)) + if (wc == 0x11D43 || (wc >= 0x11D8A && wc <= 0x11D8E)) return TRUE; - if ((wc >= 0x11D93 && wc <= 0x11D94) || + if ((wc >= 0x11D90 && wc <= 0x11D91) || + (wc >= 0x11D93 && wc <= 0x11D94) || (wc >= 0x11EF3 && wc <= 0x11EF6)) return TRUE; return FALSE; @@ -527,6 +585,276 @@ _pango_is_Vowel_Dependent (gunichar wc) return FALSE; } +static inline gboolean +_pango_is_Consonant_Prefixed (gunichar wc) +{ + if ((wc >= 0x111C2 && wc <= 0x111C3) || + wc == 0x1193F || wc == 0x11A3A || (wc >= 0x11A84 && wc <= 0x11A89)) + return TRUE; + return FALSE; +} + +static inline gboolean +_pango_is_Consonant_Preceding_Repha (gunichar wc) +{ + if (wc == 0x0D4E || wc == 0x11941 || wc == 0x11D46) + return TRUE; + return FALSE; +} + +static inline gboolean +_pango_is_EastAsianWide (gunichar wc) +{ + if ((wc >= 0x1100 && wc <= 0x2797)) + { + if ((wc >= 0x1100 && wc <= 0x23F3)) + { + if ((wc >= 0x1100 && wc <= 0x115F)) + return TRUE; + if (wc == 0x20A9 || (wc >= 0x231A && wc <= 0x231B)) + return TRUE; + if ((wc >= 0x2329 && wc <= 0x232A)) + return TRUE; + if ((wc >= 0x23E9 && wc <= 0x23EC) || wc == 0x23F0 || wc == 0x23F3) + return TRUE; + return FALSE; + } + if ((wc >= 0x25FD && wc <= 0x26BE)) + { + if ((wc >= 0x25FD && wc <= 0x25FE) || + (wc >= 0x2614 && wc <= 0x2615)) + return TRUE; + if ((wc >= 0x2648 && wc <= 0x2653) || wc == 0x267F) + return TRUE; + if (wc == 0x2693 || wc == 0x26A1) + return TRUE; + if ((wc >= 0x26AA && wc <= 0x26AB) || + (wc >= 0x26BD && wc <= 0x26BE)) + return TRUE; + return FALSE; + } + if ((wc >= 0x26C4 && wc <= 0x26FA)) + { + if ((wc >= 0x26C4 && wc <= 0x26C5)) + return TRUE; + if (wc == 0x26CE || wc == 0x26D4) + return TRUE; + if (wc == 0x26EA) + return TRUE; + if ((wc >= 0x26F2 && wc <= 0x26F3) || wc == 0x26F5 || wc == 0x26FA) + return TRUE; + return FALSE; + } + if ((wc >= 0x26FD && wc <= 0x2797)) + { + if (wc == 0x26FD || wc == 0x2705) + return TRUE; + if ((wc >= 0x270A && wc <= 0x270B) || wc == 0x2728) + return TRUE; + if (wc == 0x274C || wc == 0x274E) + return TRUE; + if ((wc >= 0x2753 && wc <= 0x2755) || + wc == 0x2757 || (wc >= 0x2795 && wc <= 0x2797)) + return TRUE; + return FALSE; + } + return FALSE; + } + if ((wc >= 0x27B0 && wc <= 0xFFC7)) + { + if ((wc >= 0x27B0 && wc <= 0x2EF3)) + { + if (wc == 0x27B0) + return TRUE; + if (wc == 0x27BF || (wc >= 0x2B1B && wc <= 0x2B1C)) + return TRUE; + if (wc == 0x2B50) + return TRUE; + if (wc == 0x2B55 || + (wc >= 0x2E80 && wc <= 0x2E99) || + (wc >= 0x2E9B && wc <= 0x2EF3)) + return TRUE; + return FALSE; + } + if ((wc >= 0x2F00 && wc <= 0x318E)) + { + if ((wc >= 0x2F00 && wc <= 0x2FD5) || + (wc >= 0x2FF0 && wc <= 0x2FFB)) + return TRUE; + if (wc == 0x3000 || (wc >= 0x3001 && wc <= 0x303E)) + return TRUE; + if ((wc >= 0x3041 && wc <= 0x3096) || + (wc >= 0x3099 && wc <= 0x30FF)) + return TRUE; + if ((wc >= 0x3105 && wc <= 0x312F) || + (wc >= 0x3131 && wc <= 0x318E)) + return TRUE; + return FALSE; + } + if ((wc >= 0x3190 && wc <= 0xA97C)) + { + if ((wc >= 0x3190 && wc <= 0x31E3)) + return TRUE; + if ((wc >= 0x31F0 && wc <= 0x321E) || + (wc >= 0x3220 && wc <= 0x3247)) + return TRUE; + if ((wc >= 0x3250 && wc <= 0x4DBF)) + return TRUE; + if ((wc >= 0x4E00 && wc <= 0xA48C) || + (wc >= 0xA490 && wc <= 0xA4C6) || + (wc >= 0xA960 && wc <= 0xA97C)) + return TRUE; + return FALSE; + } + if ((wc >= 0xAC00 && wc <= 0xFFC7)) + { + if ((wc >= 0xAC00 && wc <= 0xD7A3) || + (wc >= 0xF900 && wc <= 0xFAFF)) + return TRUE; + if ((wc >= 0xFE10 && wc <= 0xFE19) || + (wc >= 0xFE30 && wc <= 0xFE52)) + return TRUE; + if ((wc >= 0xFE54 && wc <= 0xFE66) || + (wc >= 0xFE68 && wc <= 0xFE6B)) + return TRUE; + if ((wc >= 0xFF01 && wc <= 0xFF60) || + (wc >= 0xFF61 && wc <= 0xFFBE) || + (wc >= 0xFFC2 && wc <= 0xFFC7)) + return TRUE; + return FALSE; + } + return FALSE; + } + if ((wc >= 0xFFCA && wc <= 0x1F3F4)) + { + if ((wc >= 0xFFCA && wc <= 0x16FF1)) + { + if ((wc >= 0xFFCA && wc <= 0xFFCF)) + return TRUE; + if ((wc >= 0xFFD2 && wc <= 0xFFD7) || + (wc >= 0xFFDA && wc <= 0xFFDC)) + return TRUE; + if ((wc >= 0xFFE0 && wc <= 0xFFE6)) + return TRUE; + if ((wc >= 0xFFE8 && wc <= 0xFFEE) || + (wc >= 0x16FE0 && wc <= 0x16FE4) || + (wc >= 0x16FF0 && wc <= 0x16FF1)) + return TRUE; + return FALSE; + } + if ((wc >= 0x17000 && wc <= 0x1F004)) + { + if ((wc >= 0x17000 && wc <= 0x187F7) || + (wc >= 0x18800 && wc <= 0x18CD5)) + return TRUE; + if ((wc >= 0x18D00 && wc <= 0x18D08) || + (wc >= 0x1B000 && wc <= 0x1B11E)) + return TRUE; + if ((wc >= 0x1B150 && wc <= 0x1B152) || + (wc >= 0x1B164 && wc <= 0x1B167)) + return TRUE; + if ((wc >= 0x1B170 && wc <= 0x1B2FB) || wc == 0x1F004) + return TRUE; + return FALSE; + } + if ((wc >= 0x1F0CF && wc <= 0x1F251)) + { + if (wc == 0x1F0CF) + return TRUE; + if (wc == 0x1F18E || (wc >= 0x1F191 && wc <= 0x1F19A)) + return TRUE; + if ((wc >= 0x1F200 && wc <= 0x1F202)) + return TRUE; + if ((wc >= 0x1F210 && wc <= 0x1F23B) || + (wc >= 0x1F240 && wc <= 0x1F248) || + (wc >= 0x1F250 && wc <= 0x1F251)) + return TRUE; + return FALSE; + } + if ((wc >= 0x1F260 && wc <= 0x1F3F4)) + { + if ((wc >= 0x1F260 && wc <= 0x1F265) || + (wc >= 0x1F300 && wc <= 0x1F320)) + return TRUE; + if ((wc >= 0x1F32D && wc <= 0x1F335) || + (wc >= 0x1F337 && wc <= 0x1F37C)) + return TRUE; + if ((wc >= 0x1F37E && wc <= 0x1F393) || + (wc >= 0x1F3A0 && wc <= 0x1F3CA)) + return TRUE; + if ((wc >= 0x1F3CF && wc <= 0x1F3D3) || + (wc >= 0x1F3E0 && wc <= 0x1F3F0) || wc == 0x1F3F4) + return TRUE; + return FALSE; + } + return FALSE; + } + if ((wc >= 0x1F3F8 && wc <= 0x3FFFD)) + { + if ((wc >= 0x1F3F8 && wc <= 0x1F57A)) + { + if ((wc >= 0x1F3F8 && wc <= 0x1F43E)) + return TRUE; + if (wc == 0x1F440 || (wc >= 0x1F442 && wc <= 0x1F4FC)) + return TRUE; + if ((wc >= 0x1F4FF && wc <= 0x1F53D)) + return TRUE; + if ((wc >= 0x1F54B && wc <= 0x1F54E) || + (wc >= 0x1F550 && wc <= 0x1F567) || wc == 0x1F57A) + return TRUE; + return FALSE; + } + if ((wc >= 0x1F595 && wc <= 0x1F6EC)) + { + if ((wc >= 0x1F595 && wc <= 0x1F596) || wc == 0x1F5A4) + return TRUE; + if ((wc >= 0x1F5FB && wc <= 0x1F64F) || + (wc >= 0x1F680 && wc <= 0x1F6C5)) + return TRUE; + if (wc == 0x1F6CC || (wc >= 0x1F6D0 && wc <= 0x1F6D2)) + return TRUE; + if ((wc >= 0x1F6D5 && wc <= 0x1F6D7) || + (wc >= 0x1F6EB && wc <= 0x1F6EC)) + return TRUE; + return FALSE; + } + if ((wc >= 0x1F6F4 && wc <= 0x1F9FF)) + { + if ((wc >= 0x1F6F4 && wc <= 0x1F6FC)) + return TRUE; + if ((wc >= 0x1F7E0 && wc <= 0x1F7EB) || + (wc >= 0x1F90C && wc <= 0x1F93A)) + return TRUE; + if ((wc >= 0x1F93C && wc <= 0x1F945)) + return TRUE; + if ((wc >= 0x1F947 && wc <= 0x1F978) || + (wc >= 0x1F97A && wc <= 0x1F9CB) || + (wc >= 0x1F9CD && wc <= 0x1F9FF)) + return TRUE; + return FALSE; + } + if ((wc >= 0x1FA70 && wc <= 0x3FFFD)) + { + if ((wc >= 0x1FA70 && wc <= 0x1FA74) || + (wc >= 0x1FA78 && wc <= 0x1FA7A)) + return TRUE; + if ((wc >= 0x1FA80 && wc <= 0x1FA86) || + (wc >= 0x1FA90 && wc <= 0x1FAA8)) + return TRUE; + if ((wc >= 0x1FAB0 && wc <= 0x1FAB6) || + (wc >= 0x1FAC0 && wc <= 0x1FAC2)) + return TRUE; + if ((wc >= 0x1FAD0 && wc <= 0x1FAD6) || + (wc >= 0x20000 && wc <= 0x2FFFD) || + (wc >= 0x30000 && wc <= 0x3FFFD)) + return TRUE; + return FALSE; + } + return FALSE; + } + return FALSE; +} + #endif /* PANGO_BREAK_TABLE_H */ /* == End of generated table == */ diff --git a/pango/pango-context.c b/pango/pango-context.c index a64eb79f..7139de0b 100644 --- a/pango/pango-context.c +++ b/pango/pango-context.c @@ -1063,6 +1063,9 @@ itemize_state_init (ItemizeState *state, width_iter_init (&state->width_iter, text + start_index, length); _pango_emoji_iter_init (&state->emoji_iter, text + start_index, length); + if (state->emoji_iter.is_emoji) + state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end); + update_end (state); if (pango_font_description_get_set_fields (state->font_desc) & PANGO_FONT_MASK_GRAVITY) @@ -1110,15 +1113,18 @@ itemize_state_next (ItemizeState *state) &state->script_end, &state->script); state->changed |= SCRIPT_CHANGED; } - if (state->run_end == state->width_iter.end) - { - width_iter_next (&state->width_iter); - state->changed |= WIDTH_CHANGED; - } if (state->run_end == state->emoji_iter.end) { _pango_emoji_iter_next (&state->emoji_iter); state->changed |= EMOJI_CHANGED; + + if (state->emoji_iter.is_emoji) + state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end); + } + if (state->run_end == state->width_iter.end) + { + width_iter_next (&state->width_iter); + state->changed |= WIDTH_CHANGED; } update_end (state); @@ -1565,7 +1571,7 @@ pango_itemize_with_base_dir (PangoContext *context, g_return_val_if_fail (length >= 0, NULL); g_return_val_if_fail (length == 0 || text != NULL, NULL); - if (length == 0) + if (length == 0 || g_utf8_strlen (text + start_index, length) == 0) return NULL; itemize_state_init (&state, context, text, base_dir, start_index, length, diff --git a/pango/pango-emoji-table.h b/pango/pango-emoji-table.h index 053f9468..33b33b04 100644 --- a/pango/pango-emoji-table.h +++ b/pango/pango-emoji-table.h @@ -7,13 +7,13 @@ * on file with this header: * * # emoji-data.txt - * # Date: 2018-02-07, 07:55:18 GMT - * # © 2018 Unicode®, Inc. + * # Date: 2020-01-28, 20:52:38 GMT + * # © 2020 Unicode®, Inc. * # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. * # For terms of use, see http://www.unicode.org/terms_of_use.html * # * # Emoji Data for UTS #51 - * # Version: 11.0 + * # Version: 13.0 * # * # For documentation and usage, see http://www.unicode.org/reports/tr51 */ @@ -75,6 +75,7 @@ static const struct Interval _pango_Emoji_table[] = {0x2699, 0x2699}, {0x269B, 0x269C}, {0x26A0, 0x26A1}, + {0x26A7, 0x26A7}, {0x26AA, 0x26AB}, {0x26B0, 0x26B1}, {0x26BD, 0x26BE}, @@ -161,21 +162,25 @@ static const struct Interval _pango_Emoji_table[] = {0x1F5FA, 0x1F64F}, {0x1F680, 0x1F6C5}, {0x1F6CB, 0x1F6D2}, + {0x1F6D5, 0x1F6D7}, {0x1F6E0, 0x1F6E5}, {0x1F6E9, 0x1F6E9}, {0x1F6EB, 0x1F6EC}, {0x1F6F0, 0x1F6F0}, - {0x1F6F3, 0x1F6F9}, - {0x1F910, 0x1F93A}, - {0x1F93C, 0x1F93E}, - {0x1F940, 0x1F945}, - {0x1F947, 0x1F970}, - {0x1F973, 0x1F976}, - {0x1F97A, 0x1F97A}, - {0x1F97C, 0x1F9A2}, - {0x1F9B0, 0x1F9B9}, - {0x1F9C0, 0x1F9C2}, - {0x1F9D0, 0x1F9FF}, + {0x1F6F3, 0x1F6FC}, + {0x1F7E0, 0x1F7EB}, + {0x1F90C, 0x1F93A}, + {0x1F93C, 0x1F945}, + {0x1F947, 0x1F978}, + {0x1F97A, 0x1F9CB}, + {0x1F9CD, 0x1F9FF}, + {0x1FA70, 0x1FA74}, + {0x1FA78, 0x1FA7A}, + {0x1FA80, 0x1FA86}, + {0x1FA90, 0x1FAA8}, + {0x1FAB0, 0x1FAB6}, + {0x1FAC0, 0x1FAC2}, + {0x1FAD0, 0x1FAD6}, }; static const struct Interval _pango_Emoji_Presentation_table[] = @@ -245,18 +250,22 @@ static const struct Interval _pango_Emoji_Presentation_table[] = {0x1F680, 0x1F6C5}, {0x1F6CC, 0x1F6CC}, {0x1F6D0, 0x1F6D2}, + {0x1F6D5, 0x1F6D7}, {0x1F6EB, 0x1F6EC}, - {0x1F6F4, 0x1F6F9}, - {0x1F910, 0x1F93A}, - {0x1F93C, 0x1F93E}, - {0x1F940, 0x1F945}, - {0x1F947, 0x1F970}, - {0x1F973, 0x1F976}, - {0x1F97A, 0x1F97A}, - {0x1F97C, 0x1F9A2}, - {0x1F9B0, 0x1F9B9}, - {0x1F9C0, 0x1F9C2}, - {0x1F9D0, 0x1F9FF}, + {0x1F6F4, 0x1F6FC}, + {0x1F7E0, 0x1F7EB}, + {0x1F90C, 0x1F93A}, + {0x1F93C, 0x1F945}, + {0x1F947, 0x1F978}, + {0x1F97A, 0x1F9CB}, + {0x1F9CD, 0x1F9FF}, + {0x1FA70, 0x1FA74}, + {0x1FA78, 0x1FA7A}, + {0x1FA80, 0x1FA86}, + {0x1FA90, 0x1FAA8}, + {0x1FAB0, 0x1FAB6}, + {0x1FAC0, 0x1FAC2}, + {0x1FAD0, 0x1FAD6}, }; static const struct Interval _pango_Emoji_Modifier_table[] = @@ -275,12 +284,12 @@ static const struct Interval _pango_Emoji_Modifier_Base_table[] = {0x1F3CA, 0x1F3CC}, {0x1F442, 0x1F443}, {0x1F446, 0x1F450}, - {0x1F466, 0x1F469}, - {0x1F46E, 0x1F46E}, - {0x1F470, 0x1F478}, + {0x1F466, 0x1F478}, {0x1F47C, 0x1F47C}, {0x1F481, 0x1F483}, {0x1F485, 0x1F487}, + {0x1F48F, 0x1F48F}, + {0x1F491, 0x1F491}, {0x1F4AA, 0x1F4AA}, {0x1F574, 0x1F575}, {0x1F57A, 0x1F57A}, @@ -292,13 +301,17 @@ static const struct Interval _pango_Emoji_Modifier_Base_table[] = {0x1F6B4, 0x1F6B6}, {0x1F6C0, 0x1F6C0}, {0x1F6CC, 0x1F6CC}, - {0x1F918, 0x1F91C}, - {0x1F91E, 0x1F91F}, + {0x1F90C, 0x1F90C}, + {0x1F90F, 0x1F90F}, + {0x1F918, 0x1F91F}, {0x1F926, 0x1F926}, {0x1F930, 0x1F939}, - {0x1F93D, 0x1F93E}, + {0x1F93C, 0x1F93E}, + {0x1F977, 0x1F977}, {0x1F9B5, 0x1F9B6}, {0x1F9B8, 0x1F9B9}, + {0x1F9BB, 0x1F9BB}, + {0x1F9CD, 0x1F9CF}, {0x1F9D1, 0x1F9DD}, }; @@ -380,10 +393,10 @@ static const struct Interval _pango_Extended_Pictographic_table[] = {0x1F8AE, 0x1F8FF}, {0x1F90C, 0x1F93A}, {0x1F93C, 0x1F945}, - {0x1F947, 0x1FFFD}, + {0x1F947, 0x1FAFF}, + {0x1FC00, 0x1FFFD}, }; #endif /* PANGO_EMOJI_TABLE_H */ /* == End of generated table == */ - diff --git a/pango/pango-glyph-item.c b/pango/pango-glyph-item.c index eb880608..a9f26aeb 100644 --- a/pango/pango-glyph-item.c +++ b/pango/pango-glyph-item.c @@ -751,7 +751,16 @@ pango_glyph_item_letter_space (PangoGlyphItem *glyph_item, have_cluster = pango_glyph_item_iter_next_cluster (&iter)) { if (!log_attrs[iter.start_char].is_cursor_position) - continue; + { + if (glyphs[iter.start_glyph].geometry.width == 0) + { + if (iter.start_glyph < iter.end_glyph) /* LTR */ + glyphs[iter.start_glyph].geometry.x_offset -= space_right; + else + glyphs[iter.start_glyph].geometry.x_offset += space_left; + } + continue; + } if (iter.start_glyph < iter.end_glyph) /* LTR */ { diff --git a/pango/pango-language.c b/pango/pango-language.c index 575d4652..bb5ed470 100644 --- a/pango/pango-language.c +++ b/pango/pango-language.c @@ -662,7 +662,7 @@ pango_language_get_scripts (PangoLanguage *language, script_for_lang, pango_script_for_lang); - if (!script_for_lang) + if (!script_for_lang || script_for_lang->scripts[0] == 0) { if (num_scripts) *num_scripts = 0; diff --git a/pango/pango-layout.c b/pango/pango-layout.c index a1ebfbcc..c0939ca9 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -1149,6 +1149,7 @@ pango_layout_set_text (PangoLayout *layout, g_warning ("Invalid UTF-8 string passed to pango_layout_set_text()"); layout->n_chars = pango_utf8_strlen (layout->text, -1); + layout->length = strlen (layout->text); layout_changed (layout); @@ -3031,13 +3032,22 @@ ensure_tab_width (PangoLayout *layout) PangoAttribute *attr; PangoAttrList *layout_attrs; PangoAttrList *tmp_attrs; - PangoAttrIterator *iter; PangoFontDescription *font_desc = pango_font_description_copy_static (pango_context_get_font_description (layout->context)); - PangoLanguage *language; + PangoLanguage *language = NULL; + PangoShapeFlags shape_flags = PANGO_SHAPE_NONE; + + if (pango_context_get_round_glyph_positions (layout->context)) + shape_flags |= PANGO_SHAPE_ROUND_POSITIONS; layout_attrs = pango_layout_get_effective_attributes (layout); - iter = pango_attr_list_get_iterator (layout_attrs); - pango_attr_iterator_get_font (iter, font_desc, &language, NULL); + if (layout_attrs) + { + PangoAttrIterator *iter; + + iter = pango_attr_list_get_iterator (layout_attrs); + pango_attr_iterator_get_font (iter, font_desc, &language, NULL); + pango_attr_iterator_destroy (iter); + } tmp_attrs = pango_attr_list_new (); @@ -3053,7 +3063,6 @@ ensure_tab_width (PangoLayout *layout) items = pango_itemize (layout->context, " ", 0, 1, tmp_attrs, NULL); - pango_attr_iterator_destroy (iter); if (layout_attrs != layout->attrs) { pango_attr_list_unref (layout_attrs); @@ -3062,7 +3071,7 @@ ensure_tab_width (PangoLayout *layout) pango_attr_list_unref (tmp_attrs); item = items->data; - pango_shape (" ", 8, &item->analysis, glyphs); + pango_shape_with_flags (" ", 8, " ", 8, &item->analysis, glyphs, shape_flags); pango_item_free (item); g_list_free (items); diff --git a/pango/pango-markup.c b/pango/pango-markup.c index 6dce1b2e..da281a62 100644 --- a/pango/pango-markup.c +++ b/pango/pango-markup.c @@ -665,8 +665,21 @@ text_handler (GMarkupParseContext *context G_GNUC_UNUSED, /* The underline should go underneath the char * we're setting as the next range_start */ - uline_index = md->index; - uline_len = g_utf8_next_char (p) - p; + if (md->attr_list != NULL) + { + /* Add the underline indicating the accelerator */ + PangoAttribute *attr; + + attr = pango_attr_underline_new (PANGO_UNDERLINE_LOW); + + uline_index = md->index; + uline_len = g_utf8_next_char (p) - p; + + attr->start_index = uline_index; + attr->end_index = uline_index + uline_len; + + pango_attr_list_change (md->attr_list, attr); + } /* set next range_start to include this char */ range_start = p; @@ -681,35 +694,12 @@ text_handler (GMarkupParseContext *context G_GNUC_UNUSED, } p = g_utf8_next_char (p); - } - - if (range_end) - { - g_string_append_len (md->text, - range_start, - range_end - range_start); - md->index += range_end - range_start; - } - else - { - g_string_append_len (md->text, - range_start, - end - range_start); - md->index += end - range_start; - } - - if (md->attr_list != NULL && uline_index >= 0) - { - /* Add the underline indicating the accelerator */ - PangoAttribute *attr; - - attr = pango_attr_underline_new (PANGO_UNDERLINE_LOW); - - attr->start_index = uline_index; - attr->end_index = uline_index + uline_len; + } - pango_attr_list_change (md->attr_list, attr); - } + g_string_append_len (md->text, + range_start, + end - range_start); + md->index += end - range_start; } } diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c index 889989dd..5e98fd16 100644 --- a/pango/pango-renderer.c +++ b/pango/pango-renderer.c @@ -974,15 +974,22 @@ pango_renderer_default_draw_error_underline (PangoRenderer *renderer, int width, int height) { - int square = height / HEIGHT_SQUARES; - int unit_width = (HEIGHT_SQUARES - 1) * square; - int width_units = (width + unit_width / 2) / unit_width; + int square; + int unit_width; + int width_units; const PangoMatrix identity = PANGO_MATRIX_INIT; const PangoMatrix *matrix; double dx, dx0, dy0; PangoMatrix total; int i; + if (width <= 0 || height <= 0) + return; + + square = height / HEIGHT_SQUARES; + unit_width = (HEIGHT_SQUARES - 1) * square; + width_units = (width + unit_width / 2) / unit_width; + x += (width - width_units * unit_width) / 2; if (renderer->matrix) diff --git a/pango/pangocairo-fcfontmap.c b/pango/pangocairo-fcfontmap.c index bd3a8583..015b8170 100644 --- a/pango/pangocairo-fcfontmap.c +++ b/pango/pangocairo-fcfontmap.c @@ -103,7 +103,7 @@ pango_cairo_fc_font_map_fontset_key_substitute (PangoFcFontMap *fcfontmap G_G PangoFcFontsetKey *fontkey, FcPattern *pattern) { - FcConfigSubstitute (NULL, pattern, FcMatchPattern); + FcConfigSubstitute (pango_fc_font_map_get_config (fcfontmap), pattern, FcMatchPattern); if (fontkey) cairo_ft_font_options_substitute (pango_fc_fontset_key_get_context_key (fontkey), diff --git a/pango/pangofc-fontmap.c b/pango/pangofc-fontmap.c index 535a6f0e..e85cf54c 100644 --- a/pango/pangofc-fontmap.c +++ b/pango/pangofc-fontmap.c @@ -808,8 +808,15 @@ pango_fc_patterns_get_pattern (PangoFcPatterns *pats) } static gboolean -pango_fc_is_supported_font_format (const char *fontformat) +pango_fc_is_supported_font_format (FcPattern* pattern) { + FcResult res; + const char *fontformat; + + res = FcPatternGetString (pattern, FC_FONTFORMAT, 0, (FcChar8 **)(void*)&fontformat); + if (res != FcResultMatch) + return FALSE; + /* harfbuzz supports only SFNT fonts. */ /* FIXME: "CFF" is used for both CFF in OpenType and bare CFF files, but * HarfBuzz does not support the later and FontConfig does not seem @@ -831,12 +838,11 @@ filter_fontset_by_format (FcFontSet *fontset) for (i = 0; i < fontset->nfont; i++) { - FcResult res; - const char *s; - - res = FcPatternGetString (fontset->fonts[i], FC_FONTFORMAT, 0, (FcChar8 **)(void*)&s); - if (res == FcResultMatch && pango_fc_is_supported_font_format (s)) - FcFontSetAdd (result, FcPatternDuplicate (fontset->fonts[i])); + if (pango_fc_is_supported_font_format (fontset->fonts[i])) + { + FcPatternReference (fontset->fonts[i]); + FcFontSetAdd (result, fontset->fonts[i]); + } } return result; @@ -851,34 +857,37 @@ pango_fc_patterns_get_font_pattern (PangoFcPatterns *pats, int i, gboolean *prep if (!pats->match && !pats->fontset) pats->match = FcFontMatch (pats->fontmap->priv->config, pats->pattern, &result); - if (pats->match) + if (pats->match && pango_fc_is_supported_font_format (pats->match)) { *prepare = FALSE; return pats->match; } } - else + + if (!pats->fontset) { - if (!pats->fontset) + FcResult result; + FcFontSet *filtered[2] = { NULL, }; + int i, n = 0; + + for (i = 0; i < 2; i++) { - FcResult result; - FcFontSet *fontset; - FcFontSet *filtered; + FcFontSet *fonts = FcConfigGetFonts (pats->fontmap->priv->config, i); + if (fonts) + filtered[n++] = filter_fontset_by_format (fonts); + } - fontset = FcFontSort (pats->fontmap->priv->config, pats->pattern, FcFalse, NULL, &result); - filtered = filter_fontset_by_format (fontset); - FcFontSetDestroy (fontset); + pats->fontset = FcFontSetSort (pats->fontmap->priv->config, filtered, n, pats->pattern, FcTrue, NULL, &result); - pats->fontset = FcFontSetSort (pats->fontmap->priv->config, &filtered, 1, pats->pattern, FcTrue, NULL, &result); + for (i = 0; i < n; i++) + FcFontSetDestroy (filtered[i]); - FcFontSetDestroy (filtered); - if (pats->match) - { - FcPatternDestroy (pats->match); - pats->match = NULL; - } - } + if (pats->match) + { + FcPatternDestroy (pats->match); + pats->match = NULL; + } } *prepare = TRUE; @@ -1404,8 +1413,7 @@ pango_fc_font_map_list_families (PangoFontMap *fontmap, int variable; PangoFcFamily *temp_family; - res = FcPatternGetString (fontset->fonts[i], FC_FONTFORMAT, 0, (FcChar8 **)(void*)&s); - if (res != FcResultMatch || !pango_fc_is_supported_font_format (s)) + if (!pango_fc_is_supported_font_format (fontset->fonts[i])) continue; res = FcPatternGetString (fontset->fonts[i], FC_FAMILY, 0, (FcChar8 **)(void*)&s); @@ -1522,7 +1530,6 @@ pango_fc_make_pattern (const PangoFontDescription *description, int slant; double weight; PangoGravity gravity; - FcBool vertical; char **families; int i; int width; @@ -1533,7 +1540,6 @@ pango_fc_make_pattern (const PangoFontDescription *description, width = pango_fc_convert_width_to_fc (pango_font_description_get_stretch (description)); gravity = pango_font_description_get_gravity (description); - vertical = PANGO_GRAVITY_IS_VERTICAL (gravity) ? FcTrue : FcFalse; /* The reason for passing in FC_SIZE as well as FC_PIXEL_SIZE is * to work around a bug in libgnomeprint where it doesn't look @@ -1542,13 +1548,14 @@ pango_fc_make_pattern (const PangoFontDescription *description, * Putting FC_SIZE in here slightly reduces the efficiency * of caching of patterns and fonts when working with multiple different * dpi values. + * + * Do not pass FC_VERTICAL_LAYOUT true as HarfBuzz shaping assumes false. */ pattern = FcPatternBuild (NULL, PANGO_FC_VERSION, FcTypeInteger, pango_version(), FC_WEIGHT, FcTypeDouble, weight, FC_SLANT, FcTypeInteger, slant, FC_WIDTH, FcTypeInteger, width, - FC_VERTICAL_LAYOUT, FcTypeBool, vertical, #ifdef FC_VARIABLE FC_VARIABLE, FcTypeBool, FcDontCare, #endif @@ -2311,7 +2318,24 @@ pango_fc_font_description_from_pattern (FcPattern *pattern, gboolean include_siz pango_font_description_set_variant (desc, PANGO_VARIANT_NORMAL); if (include_size && FcPatternGetDouble (pattern, FC_SIZE, 0, &size) == FcResultMatch) - pango_font_description_set_size (desc, size * PANGO_SCALE); + { + FcMatrix *fc_matrix; + double scale_factor = 1; + + if (FcPatternGetMatrix (pattern, FC_MATRIX, 0, &fc_matrix) == FcResultMatch) + { + PangoMatrix mat = PANGO_MATRIX_INIT; + + mat.xx = fc_matrix->xx; + mat.xy = fc_matrix->xy; + mat.yx = fc_matrix->yx; + mat.yy = fc_matrix->yy; + + scale_factor = pango_matrix_get_font_scale_factor (&mat); + } + + pango_font_description_set_size (desc, scale_factor * size * PANGO_SCALE); + } /* gravity is a bit different. we don't want to set it if it was not set on * the pattern */ @@ -2548,6 +2572,32 @@ create_face (PangoFcFamily *fcfamily, return face; } +static int +compare_face (const void *p1, const void *p2) +{ + const PangoFcFace *f1 = *(const void **)p1; + const PangoFcFace *f2 = *(const void **)p2; + int w1, w2; + int s1, s2; + + if (FcPatternGetInteger (f1->pattern, FC_WEIGHT, 0, &w1) != FcResultMatch) + w1 = FC_WEIGHT_MEDIUM; + + if (FcPatternGetInteger (f1->pattern, FC_SLANT, 0, &s1) != FcResultMatch) + s1 = FC_SLANT_ROMAN; + + if (FcPatternGetInteger (f2->pattern, FC_WEIGHT, 0, &w2) != FcResultMatch) + w2 = FC_WEIGHT_MEDIUM; + + if (FcPatternGetInteger (f2->pattern, FC_SLANT, 0, &s2) != FcResultMatch) + s2 = FC_SLANT_ROMAN; + + if (s1 != s2) + return s1 - s2; /* roman < italic < oblique */ + + return w1 - w2; /* from light to heavy */ +} + static void pango_fc_family_list_faces (PangoFontFamily *family, PangoFontFace ***faces, @@ -2667,6 +2717,8 @@ pango_fc_family_list_faces (PangoFontFamily *family, faces = g_renew (PangoFcFace *, faces, num); + qsort (faces, num, sizeof (PangoFcFace *), compare_face); + fcfamily->n_faces = num; fcfamily->faces = faces; } diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c index 9fe193f6..69f5462b 100644 --- a/pango/pangofc-shape.c +++ b/pango/pangofc-shape.c @@ -409,8 +409,8 @@ pango_hb_shape (PangoFont *font, for (i = 0; i < num_glyphs; i++) { /* 90 degrees rotation counter-clockwise. */ - infos[i].geometry.width = hb_position->y_advance; - infos[i].geometry.x_offset = hb_position->y_offset; + infos[i].geometry.width = - hb_position->y_advance; + infos[i].geometry.x_offset = - hb_position->y_offset; infos[i].geometry.y_offset = - hb_position->x_offset; hb_position++; } diff --git a/tests/GraphemeBreakTest.txt b/tests/GraphemeBreakTest.txt index 6847953c..5baf292a 100644 --- a/tests/GraphemeBreakTest.txt +++ b/tests/GraphemeBreakTest.txt @@ -1,6 +1,6 @@ -# GraphemeBreakTest-11.0.0.txt -# Date: 2018-03-18, 13:30:33 GMT -# © 2018 Unicode®, Inc. +# GraphemeBreakTest-13.0.0.txt +# Date: 2019-11-15, 19:49:10 GMT +# © 2019 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see http://www.unicode.org/terms_of_use.html # @@ -56,8 +56,6 @@ ÷ 0020 × 0308 × 200D ÷ # ÷ [0.2] SPACE (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 0020 ÷ 0378 ÷ # ÷ [0.2] SPACE (Other) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 0020 × 0308 ÷ 0378 ÷ # ÷ [0.2] SPACE (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 0020 ÷ D800 ÷ # ÷ [0.2] SPACE (Other) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 0020 × 0308 ÷ D800 ÷ # ÷ [0.2] SPACE (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 000D ÷ 0020 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] SPACE (Other) ÷ [0.3] ÷ 000D ÷ 0308 ÷ 0020 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 000D ÷ 000D ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -92,8 +90,6 @@ ÷ 000D ÷ 0308 × 200D ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 000D ÷ 0378 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] <reserved-0378> (Other) ÷ [0.3] ÷ 000D ÷ 0308 ÷ 0378 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 000D ÷ D800 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 000D ÷ 0308 ÷ D800 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 000A ÷ 0020 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] SPACE (Other) ÷ [0.3] ÷ 000A ÷ 0308 ÷ 0020 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 000A ÷ 000D ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -128,8 +124,6 @@ ÷ 000A ÷ 0308 × 200D ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 000A ÷ 0378 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] <reserved-0378> (Other) ÷ [0.3] ÷ 000A ÷ 0308 ÷ 0378 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 000A ÷ D800 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 000A ÷ 0308 ÷ D800 ÷ # ÷ [0.2] <LINE FEED (LF)> (LF) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 0001 ÷ 0020 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] SPACE (Other) ÷ [0.3] ÷ 0001 ÷ 0308 ÷ 0020 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0001 ÷ 000D ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -164,8 +158,6 @@ ÷ 0001 ÷ 0308 × 200D ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 0001 ÷ 0378 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] <reserved-0378> (Other) ÷ [0.3] ÷ 0001 ÷ 0308 ÷ 0378 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 0001 ÷ D800 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 0001 ÷ 0308 ÷ D800 ÷ # ÷ [0.2] <START OF HEADING> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 034F ÷ 0020 ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 034F × 0308 ÷ 0020 ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 034F ÷ 000D ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -200,8 +192,6 @@ ÷ 034F × 0308 × 200D ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 034F ÷ 0378 ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 034F × 0308 ÷ 0378 ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 034F ÷ D800 ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 034F × 0308 ÷ D800 ÷ # ÷ [0.2] COMBINING GRAPHEME JOINER (Extend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 1F1E6 ÷ 0020 ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 1F1E6 × 0308 ÷ 0020 ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 1F1E6 ÷ 000D ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -236,8 +226,6 @@ ÷ 1F1E6 × 0308 × 200D ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 1F1E6 ÷ 0378 ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 1F1E6 × 0308 ÷ 0378 ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 1F1E6 ÷ D800 ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 1F1E6 × 0308 ÷ D800 ÷ # ÷ [0.2] REGIONAL INDICATOR SYMBOL LETTER A (RI) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 0600 × 0020 ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] SPACE (Other) ÷ [0.3] ÷ 0600 × 0308 ÷ 0020 ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0600 ÷ 000D ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -272,8 +260,6 @@ ÷ 0600 × 0308 × 200D ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 0600 × 0378 ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.2] <reserved-0378> (Other) ÷ [0.3] ÷ 0600 × 0308 ÷ 0378 ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 0600 ÷ D800 ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 0600 × 0308 ÷ D800 ÷ # ÷ [0.2] ARABIC NUMBER SIGN (Prepend) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 0903 ÷ 0020 ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0903 × 0308 ÷ 0020 ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0903 ÷ 000D ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -308,8 +294,6 @@ ÷ 0903 × 0308 × 200D ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 0903 ÷ 0378 ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 0903 × 0308 ÷ 0378 ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 0903 ÷ D800 ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 0903 × 0308 ÷ D800 ÷ # ÷ [0.2] DEVANAGARI SIGN VISARGA (SpacingMark) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 1100 ÷ 0020 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 1100 × 0308 ÷ 0020 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 1100 ÷ 000D ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -344,8 +328,6 @@ ÷ 1100 × 0308 × 200D ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 1100 ÷ 0378 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 1100 × 0308 ÷ 0378 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 1100 ÷ D800 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 1100 × 0308 ÷ D800 ÷ # ÷ [0.2] HANGUL CHOSEONG KIYEOK (L) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 1160 ÷ 0020 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 1160 × 0308 ÷ 0020 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 1160 ÷ 000D ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -380,8 +362,6 @@ ÷ 1160 × 0308 × 200D ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 1160 ÷ 0378 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 1160 × 0308 ÷ 0378 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 1160 ÷ D800 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 1160 × 0308 ÷ D800 ÷ # ÷ [0.2] HANGUL JUNGSEONG FILLER (V) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 11A8 ÷ 0020 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 11A8 × 0308 ÷ 0020 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 11A8 ÷ 000D ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -416,8 +396,6 @@ ÷ 11A8 × 0308 × 200D ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 11A8 ÷ 0378 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 11A8 × 0308 ÷ 0378 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 11A8 ÷ D800 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 11A8 × 0308 ÷ D800 ÷ # ÷ [0.2] HANGUL JONGSEONG KIYEOK (T) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ AC00 ÷ 0020 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ AC00 × 0308 ÷ 0020 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ AC00 ÷ 000D ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -452,8 +430,6 @@ ÷ AC00 × 0308 × 200D ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ AC00 ÷ 0378 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ AC00 × 0308 ÷ 0378 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ AC00 ÷ D800 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ AC00 × 0308 ÷ D800 ÷ # ÷ [0.2] HANGUL SYLLABLE GA (LV) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ AC01 ÷ 0020 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ AC01 × 0308 ÷ 0020 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ AC01 ÷ 000D ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -488,8 +464,6 @@ ÷ AC01 × 0308 × 200D ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ AC01 ÷ 0378 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ AC01 × 0308 ÷ 0378 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ AC01 ÷ D800 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ AC01 × 0308 ÷ D800 ÷ # ÷ [0.2] HANGUL SYLLABLE GAG (LVT) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 231A ÷ 0020 ÷ # ÷ [0.2] WATCH (ExtPict) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 231A × 0308 ÷ 0020 ÷ # ÷ [0.2] WATCH (ExtPict) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 231A ÷ 000D ÷ # ÷ [0.2] WATCH (ExtPict) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -524,8 +498,6 @@ ÷ 231A × 0308 × 200D ÷ # ÷ [0.2] WATCH (ExtPict) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 231A ÷ 0378 ÷ # ÷ [0.2] WATCH (ExtPict) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 231A × 0308 ÷ 0378 ÷ # ÷ [0.2] WATCH (ExtPict) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 231A ÷ D800 ÷ # ÷ [0.2] WATCH (ExtPict) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 231A × 0308 ÷ D800 ÷ # ÷ [0.2] WATCH (ExtPict) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 0300 ÷ 0020 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0300 × 0308 ÷ 0020 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0300 ÷ 000D ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -560,8 +532,6 @@ ÷ 0300 × 0308 × 200D ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 0300 ÷ 0378 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 0300 × 0308 ÷ 0378 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 0300 ÷ D800 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 0300 × 0308 ÷ D800 ÷ # ÷ [0.2] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 200D ÷ 0020 ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 200D × 0308 ÷ 0020 ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 200D ÷ 000D ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -596,8 +566,6 @@ ÷ 200D × 0308 × 200D ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 200D ÷ 0378 ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 200D × 0308 ÷ 0378 ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 200D ÷ D800 ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 200D × 0308 ÷ D800 ÷ # ÷ [0.2] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 0378 ÷ 0020 ÷ # ÷ [0.2] <reserved-0378> (Other) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0378 × 0308 ÷ 0020 ÷ # ÷ [0.2] <reserved-0378> (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] ÷ 0378 ÷ 000D ÷ # ÷ [0.2] <reserved-0378> (Other) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] @@ -632,44 +600,6 @@ ÷ 0378 × 0308 × 200D ÷ # ÷ [0.2] <reserved-0378> (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] ÷ 0378 ÷ 0378 ÷ # ÷ [0.2] <reserved-0378> (Other) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] ÷ 0378 × 0308 ÷ 0378 ÷ # ÷ [0.2] <reserved-0378> (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ 0378 ÷ D800 ÷ # ÷ [0.2] <reserved-0378> (Other) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ 0378 × 0308 ÷ D800 ÷ # ÷ [0.2] <reserved-0378> (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] -÷ D800 ÷ 0020 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] SPACE (Other) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 0020 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] SPACE (Other) ÷ [0.3] -÷ D800 ÷ 000D ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 000D ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <CARRIAGE RETURN (CR)> (CR) ÷ [0.3] -÷ D800 ÷ 000A ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] <LINE FEED (LF)> (LF) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 000A ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [0.3] -÷ D800 ÷ 0001 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] <START OF HEADING> (Control) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 0001 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <START OF HEADING> (Control) ÷ [0.3] -÷ D800 ÷ 034F ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING GRAPHEME JOINER (Extend) ÷ [0.3] -÷ D800 ÷ 0308 × 034F ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] COMBINING GRAPHEME JOINER (Extend) ÷ [0.3] -÷ D800 ÷ 1F1E6 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 1F1E6 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] REGIONAL INDICATOR SYMBOL LETTER A (RI) ÷ [0.3] -÷ D800 ÷ 0600 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] ARABIC NUMBER SIGN (Prepend) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 0600 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] ARABIC NUMBER SIGN (Prepend) ÷ [0.3] -÷ D800 ÷ 0903 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [0.3] -÷ D800 ÷ 0308 × 0903 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.1] DEVANAGARI SIGN VISARGA (SpacingMark) ÷ [0.3] -÷ D800 ÷ 1100 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 1100 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL CHOSEONG KIYEOK (L) ÷ [0.3] -÷ D800 ÷ 1160 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 1160 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL JUNGSEONG FILLER (V) ÷ [0.3] -÷ D800 ÷ 11A8 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 11A8 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL JONGSEONG KIYEOK (T) ÷ [0.3] -÷ D800 ÷ AC00 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] HANGUL SYLLABLE GA (LV) ÷ [0.3] -÷ D800 ÷ 0308 ÷ AC00 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL SYLLABLE GA (LV) ÷ [0.3] -÷ D800 ÷ AC01 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3] -÷ D800 ÷ 0308 ÷ AC01 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] HANGUL SYLLABLE GAG (LVT) ÷ [0.3] -÷ D800 ÷ 231A ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] WATCH (ExtPict) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 231A ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] WATCH (ExtPict) ÷ [0.3] -÷ D800 ÷ 0300 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [0.3] -÷ D800 ÷ 0308 × 0300 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] COMBINING GRAVE ACCENT (Extend_ExtCccZwj) ÷ [0.3] -÷ D800 ÷ 200D ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] -÷ D800 ÷ 0308 × 200D ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [0.3] -÷ D800 ÷ 0378 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] <reserved-0378> (Other) ÷ [0.3] -÷ D800 ÷ 0308 ÷ 0378 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [999.0] <reserved-0378> (Other) ÷ [0.3] -÷ D800 ÷ D800 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] <surrogate-D800> (Control) ÷ [0.3] -÷ D800 ÷ 0308 ÷ D800 ÷ # ÷ [0.2] <surrogate-D800> (Control) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [5.0] <surrogate-D800> (Control) ÷ [0.3] ÷ 000D × 000A ÷ 0061 ÷ 000A ÷ 0308 ÷ # ÷ [0.2] <CARRIAGE RETURN (CR)> (CR) × [3.0] <LINE FEED (LF)> (LF) ÷ [4.0] LATIN SMALL LETTER A (Other) ÷ [5.0] <LINE FEED (LF)> (LF) ÷ [4.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [0.3] ÷ 0061 × 0308 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Other) × [9.0] COMBINING DIAERESIS (Extend_ExtCccZwj) ÷ [0.3] ÷ 0020 × 200D ÷ 0646 ÷ # ÷ [0.2] SPACE (Other) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [999.0] ARABIC LETTER NOON (Other) ÷ [0.3] @@ -695,6 +625,6 @@ ÷ 2701 × 200D × 2701 ÷ # ÷ [0.2] UPPER BLADE SCISSORS (Other) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) × [11.0] UPPER BLADE SCISSORS (Other) ÷ [0.3] ÷ 0061 × 200D ÷ 2701 ÷ # ÷ [0.2] LATIN SMALL LETTER A (Other) × [9.0] ZERO WIDTH JOINER (ZWJ_ExtCccZwj) ÷ [999.0] UPPER BLADE SCISSORS (Other) ÷ [0.3] # -# Lines: 672 +# Lines: 602 # # EOF diff --git a/tests/SentenceBreakTest.txt b/tests/SentenceBreakTest.txt index 70898a31..5ae1f881 100644 --- a/tests/SentenceBreakTest.txt +++ b/tests/SentenceBreakTest.txt @@ -1,6 +1,6 @@ -# SentenceBreakTest-11.0.0.txt -# Date: 2018-01-31, 08:20:29 GMT -# © 2018 Unicode®, Inc. +# SentenceBreakTest-13.0.0.txt +# Date: 2019-11-20, 22:27:22 GMT +# © 2019 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see http://www.unicode.org/terms_of_use.html # diff --git a/tests/WordBreakTest.txt b/tests/WordBreakTest.txt index c4c92550..3e85759b 100644 --- a/tests/WordBreakTest.txt +++ b/tests/WordBreakTest.txt @@ -1,6 +1,6 @@ -# WordBreakTest-11.0.0.txt -# Date: 2018-03-16, 20:34:16 GMT -# © 2018 Unicode®, Inc. +# WordBreakTest-13.0.0.txt +# Date: 2019-11-20, 22:27:23 GMT +# © 2019 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see http://www.unicode.org/terms_of_use.html # diff --git a/tests/layouts/valid-6.expected b/tests/layouts/valid-6.expected new file mode 100644 index 00000000..b8f90c34 --- /dev/null +++ b/tests/layouts/valid-6.expected @@ -0,0 +1,25 @@ + 0️⃣ Keycap Digit Zero + +--- parameters + +wrapped: 0 +ellipsized: 0 +lines: 2 + +--- attributes + +range 0 2147483647 + +--- lines + +i=1, index=0, paragraph-start=1, dir=ltr ' 0️⃣ Keycap Digit Zero +' +i=2, index=27, paragraph-start=1, dir=ltr '' + +--- runs + +i=1, index=0, chars=1, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' ' +i=2, index=1, chars=3, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, '0️⃣' +i=3, index=8, chars=18, level=0, gravity=south, flags=0, font=OMITTED, script=latin, language=en-us, ' Keycap Digit Zero' +i=4, index=26, no run, line end +i=5, index=27, no run, line end diff --git a/tests/layouts/valid-6.markup b/tests/layouts/valid-6.markup new file mode 100644 index 00000000..92c53e28 --- /dev/null +++ b/tests/layouts/valid-6.markup @@ -0,0 +1,2 @@ + + 0️⃣ Keycap Digit Zero diff --git a/tests/meson.build b/tests/meson.build index c617331f..4b0d4182 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -8,6 +8,8 @@ endif if host_system == 'windows' test_cflags += '-DHAVE_WIN32' +elif host_system == 'darwin' + test_cflags += '-DHAVE_CARBON' endif test_env = [ @@ -21,6 +23,7 @@ tests = [ [ 'testboundaries' ], [ 'testboundaries_ucd' ], [ 'testcolor' ], + [ 'testmisc', [ 'testmisc.c' ], [ libpangocairo_dep ] ], [ 'testscript' ], [ 'test-harfbuzz', [ 'test-harfbuzz.c' ], [ libpangocairo_dep ] ], [ 'cxx-test', [ 'cxx-test.cpp' ], [ libpangocairo_dep ] ], diff --git a/tests/test-font.c b/tests/test-font.c index 6b8f45be..dd110571 100644 --- a/tests/test-font.c +++ b/tests/test-font.c @@ -188,6 +188,73 @@ test_extents (void) g_object_unref (context); } +static void +test_roundtrip_plain (void) +{ + PangoFontMap *fontmap; + PangoContext *context; + PangoFontDescription *desc, *desc2; + PangoFont *font; + +#ifdef HAVE_CARBON + /* We probably don't have the right fonts */ + g_test_skip ("Skipping font-dependent tests on OS X"); + return; +#endif + + fontmap = pango_cairo_font_map_get_default (); + context = pango_font_map_create_context (fontmap); + + desc = pango_font_description_from_string ("Cantarell 11"); + + font = pango_context_load_font (context, desc); + desc2 = pango_font_describe (font); + + g_assert (pango_font_description_equal (desc2, desc)); + + pango_font_description_free (desc2); + g_object_unref (font); + pango_font_description_free (desc); + g_object_unref (context); +} + +static void +test_roundtrip_emoji (void) +{ + PangoFontMap *fontmap; + PangoContext *context; + PangoFontDescription *desc, *desc2; + PangoFont *font; + +#ifdef HAVE_CARBON + /* We probably don't have the right fonts */ + g_test_skip ("Skipping font-dependent tests on OS X"); + return; +#endif + + fontmap = pango_cairo_font_map_get_default (); + context = pango_font_map_create_context (fontmap); + + /* This is how pango_itemize creates the emoji font desc */ + desc = pango_font_description_from_string ("Cantarell 11"); + pango_font_description_set_family_static (desc, "emoji"); + + font = pango_context_load_font (context, desc); + desc2 = pango_font_describe (font); + + /* We can't expect the family name to match, since we go in with + * a generic family + */ + pango_font_description_unset_fields (desc, PANGO_FONT_MASK_FAMILY); + pango_font_description_unset_fields (desc2, PANGO_FONT_MASK_FAMILY); + g_assert (pango_font_description_equal (desc2, desc)); + + pango_font_description_free (desc2); + g_object_unref (font); + pango_font_description_free (desc); + g_object_unref (context); +} + int main (int argc, char *argv[]) { @@ -203,6 +270,8 @@ main (int argc, char *argv[]) g_test_add_func ("/pango/fontdescription/roundtrip", test_roundtrip); g_test_add_func ("/pango/fontdescription/variation", test_variation); g_test_add_func ("/pango/font/extents", test_extents); + g_test_add_func ("/pango/font/roundtrip/plain", test_roundtrip_plain); + g_test_add_func ("/pango/font/roundtrip/emoji", test_roundtrip_emoji); return g_test_run (); } diff --git a/tests/test-shape.c b/tests/test-shape.c index 6c1ae296..17eaa1e0 100644 --- a/tests/test-shape.c +++ b/tests/test-shape.c @@ -185,8 +185,6 @@ test_file (const gchar *filename, GString *string) pango_attr_list_unref (itemize_attrs); pango_attr_list_unref (shape_attrs); - pango_attr_list_unref (attrs); - for (l = items; l; l = l->next) { PangoItem *item = l->data; @@ -281,6 +279,8 @@ test_file (const gchar *filename, GString *string) g_list_free_full (items, (GDestroyNotify)pango_item_free); g_free (contents); g_free (text); + + pango_attr_list_unref (attrs); } static gchar * diff --git a/tests/testmisc.c b/tests/testmisc.c new file mode 100644 index 00000000..5ba7c81b --- /dev/null +++ b/tests/testmisc.c @@ -0,0 +1,112 @@ +/* Pango + * testmisc.c: Test program for miscellaneous things + * + * Copyright (C) 2020 Matthias Clasen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include "config.h" +#include <glib.h> +#include <pango/pangocairo.h> + +static void +test_shape_tab_crash (void) +{ + PangoContext *context; + PangoLayout *layout; + + context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); + layout = pango_layout_new (context); + pango_layout_set_text (layout, "one\ttwo", -1); + pango_layout_is_ellipsized (layout); + + g_object_unref (layout); + g_object_unref (context); +} + +/* Test that itemizing a string with 0 characters works + */ +static void +test_itemize_empty_crash (void) +{ + PangoContext *context; + + context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); + pango_itemize_with_base_dir (context, PANGO_DIRECTION_LTR, "", 0, 1, NULL, NULL); + + g_object_unref (context); +} + +static void +test_itemize_utf8 (void) +{ + PangoContext *context; + GList *result = NULL; + + context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); + result = pango_itemize_with_base_dir (context, PANGO_DIRECTION_LTR, "\xc3\xa1\na", 3, 1, NULL, NULL); + g_assert (result != NULL); + + g_object_unref (context); +} + +/* Test that pango_layout_set_text (layout, "short", 200) + * does not lead to a crash. (pidgin does this) + */ +static void +test_short_string_crash (void) +{ + PangoContext *context; + PangoLayout *layout; + int width, height; + + context = pango_font_map_create_context (pango_cairo_font_map_get_default ()); + layout = pango_layout_new (context); + pango_layout_set_text (layout, "short text", 200); + pango_layout_get_pixel_size (layout, &width, &height); + + g_object_unref (layout); + g_object_unref (context); +} + +static void +test_language_emoji_crash (void) +{ + PangoLanguage *lang; + const PangoScript *scripts; + int num; + + lang = pango_language_from_string ("und-zsye"); + scripts = pango_language_get_scripts (lang, &num); + + g_assert (num >= 0); + g_assert (scripts == NULL || num > 0); +} + +int +main (int argc, char *argv[]) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add_func ("/layout/shape-tab-crash", test_shape_tab_crash); + g_test_add_func ("/layout/itemize-empty-crash", test_itemize_empty_crash); + g_test_add_func ("/layout/itemize-utf8", test_itemize_utf8); + g_test_add_func ("/layout/short-string-crash", test_short_string_crash); + g_test_add_func ("/language/emoji-crash", test_language_emoji_crash); + + return g_test_run (); +} diff --git a/tools/gen-break-table.py b/tools/gen-break-table.py index 2c8a7d70..5d346c8c 100755 --- a/tools/gen-break-table.py +++ b/tools/gen-break-table.py @@ -9,20 +9,21 @@ from collections import OrderedDict header = [] ranges = OrderedDict() -def load_data(filename): +def load_data(filename, prefix=""): global header, ranges f = open(filename) lines = f.readlines() for line in lines: - header.append(line) if not line.startswith("#"): break + header.append(line) for line in lines: line = line.strip() if not line or line[0] == '#': continue rang, typ = [s.strip() for s in line.split('#')[0].split(';')[:2]] + typ = prefix + typ rang = [int(s, 16) for s in rang.split('..')] if len(rang) > 1: @@ -87,6 +88,7 @@ def print_ranges(ranges): def print_balanced_search(ranges): if 4 >= len(ranges): print_ranges(ranges) + print("return FALSE;") return length = len(ranges) @@ -116,7 +118,7 @@ def print_table(): print("/*") print(" * The following tables are generated by running:") print(" *") - print(" * ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt | indent") + print(" * ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt EastAsianWidth.txt | indent") print(" *") print(" * on files with these headers:") print(" *") @@ -132,14 +134,22 @@ def print_table(): for typ,s in ranges.items(): if typ not in ['STerm', - 'Virama', - 'Vowel_Dependent']: continue + 'Virama', + 'Vowel_Dependent', + 'Consonant_Prefixed', + 'Consonant_Preceding_Repha']: continue print() print("static inline gboolean _pango_is_%s (gunichar wc)" % typ) print("{") - print_balanced_search(sorted(s)) + print_balanced_search(sorted(s)) print("}") + s = ranges["EastAsian_F"] + ranges["EastAsian_W"] + ranges["EastAsian_H"] + print("static inline gboolean _pango_is_EastAsianWide (gunichar wc)") + print("{") + print_balanced_search(sorted(s)) + print("}") + print() print("#endif /* PANGO_BREAK_TABLE_H */") print() @@ -147,10 +157,11 @@ def print_table(): if __name__ == "__main__": - if len (sys.argv) != 3: - print("usage: ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt | indent", file=sys.stderr) + if len (sys.argv) != 4: + print("usage: ./gen-break-table.py SentenceBreakProperty.txt IndicSyllabicCategory.txt EastAsianWidth.txt | indent", file=sys.stderr) sys.exit (1) load_data(sys.argv[1]) load_data(sys.argv[2]) + load_data(sys.argv[3], "EastAsian_") print_table() |