Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: third_party/WebKit/Source/platform/fonts/CharacterData.h

Issue 1780723002: Enable Emoji Fitzpatrick modifier sequences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CharacterData_h 5 #ifndef CharacterData_h
6 #define CharacterData_h 6 #define CharacterData_h
7 7
8 #include <unicode/uobject.h> 8 #include <unicode/uobject.h>
9 9
10 namespace blink { 10 namespace blink {
11 11
12 static const UChar32 isCJKIdeographOrSymbolArray[] = { 12 static const UChar32 isCJKIdeographOrSymbolArray[] = {
13 // 0x2C7 Caron, Mandarin Chinese 3rd Tone 13 // 0x2C7 Caron, Mandarin Chinese 3rd Tone
14 0x2C7, 14 0x2C7,
15 // 0x2CA Modifier Letter Acute Accent, Mandarin Chinese 2nd Tone 15 // 0x2CA Modifier Letter Acute Accent, Mandarin Chinese 2nd Tone
16 0x2CA, 16 0x2CA,
17 // 0x2CB Modifier Letter Grave Access, Mandarin Chinese 4th Tone 17 // 0x2CB Modifier Letter Grave Access, Mandarin Chinese 4th Tone
18 0x2CB, 18 0x2CB,
19 // 0x2D9 Dot Above, Mandarin Chinese 5th Tone 19 // 0x2D9 Dot Above, Mandarin Chinese 5th Tone
20 0x2D9, 20 0x2D9,
21 0x2020, 0x2021, 0x2030, 0x203B, 0x203C, 0x2042, 0x2047, 0x2048, 0x2049, 0x20 51, 21 0x2020, 0x2021, 0x2030, 0x203B, 0x203C, 0x2042, 0x2047, 0x2048, 0x2049, 0x20 51,
22 0x20DD, 0x20DE, 0x2100, 0x2103, 0x2105, 0x2109, 0x210A, 0x2113, 0x2116, 0x21 21, 22 0x20DD, 0x20DE, 0x2100, 0x2103, 0x2105, 0x2109, 0x210A, 0x2113, 0x2116, 0x21 21,
23 0x212B, 0x213B, 0x2150, 0x2151, 0x2152, 0x217F, 0x2189, 0x2307, 0x2312, 0x23 CE, 23 0x212B, 0x213B, 0x2150, 0x2151, 0x2152, 0x217F, 0x2189, 0x2307, 0x2312, 0x23 CE,
24 0x2423, 0x25A0, 0x25A1, 0x25A2, 0x25AA, 0x25AB, 0x25B1, 0x25B2, 0x25B3, 0x25 B6, 24 0x2423, 0x25A0, 0x25A1, 0x25A2, 0x25AA, 0x25AB, 0x25B1, 0x25B2, 0x25B3, 0x25 B6,
25 0x25B7, 0x25BC, 0x25BD, 0x25C0, 0x25C1, 0x25C6, 0x25C7, 0x25C9, 0x25CB, 0x25 CC, 25 0x25B7, 0x25BC, 0x25BD, 0x25C0, 0x25C1, 0x25C6, 0x25C7, 0x25C9, 0x25CB, 0x25 CC,
26 0x25EF, 0x2605, 0x2606, 0x260E, 0x2616, 0x2617, 0x2640, 0x2642, 0x26A0, 0x26 BD, 26 0x25EF, 0x2605, 0x2606, 0x260E, 0x2616, 0x2617, 0x261D, 0x2640, 0x2642, 0x26 A0,
27 0x26BE, 0x2713, 0x271A, 0x273F, 0x2740, 0x2756, 0x2B1A, 0xFE10, 0xFE11, 0xFE 12, 27 0x26BD, 0x26BE, 0x26F9, 0x2713, 0x271A, 0x273F, 0x2740, 0x2756, 0x2B1A, 0xFE 10,
28 0xFE19, 0xFF1D, 28 0xFE11, 0xFE12, 0xFE19, 0xFF1D,
29 // Emoji. 29 // Emoji.
30 0x1F100 30 0x1F100
31 }; 31 };
32 32
33 static const UChar32 isCJKIdeographOrSymbolRanges[] = { 33 static const UChar32 isCJKIdeographOrSymbolRanges[] = {
34 // cjkIdeographRanges 34 // cjkIdeographRanges
35 // CJK Radicals Supplement and Kangxi Radicals. 35 // CJK Radicals Supplement and Kangxi Radicals.
36 0x2E80, 0x2FDF, 36 0x2E80, 0x2FDF,
37 // CJK Strokes. 37 // CJK Strokes.
38 0x31C0, 0x31EF, 38 0x31C0, 0x31EF,
(...skipping 22 matching lines...) Expand all
61 0x25E2, 0x25E6, 61 0x25E2, 0x25E6,
62 0x2600, 0x2603, 62 0x2600, 0x2603,
63 0x2660, 0x266F, 63 0x2660, 0x266F,
64 // Emoji HEAVY HEART EXCLAMATION MARK ORNAMENT..HEAVY BLACK HEART 64 // Emoji HEAVY HEART EXCLAMATION MARK ORNAMENT..HEAVY BLACK HEART
65 // Needed in order not to break Emoji heart-kiss sequences in 65 // Needed in order not to break Emoji heart-kiss sequences in
66 // CachingWordShapeIterator. 66 // CachingWordShapeIterator.
67 // cmp. http://www.unicode.org/emoji/charts/emoji-zwj-sequences.html 67 // cmp. http://www.unicode.org/emoji/charts/emoji-zwj-sequences.html
68 0x2763, 0x2764, 68 0x2763, 0x2764,
69 0x2672, 0x267D, 69 0x2672, 0x267D,
70 0x2776, 0x277F, 70 0x2776, 0x277F,
71 // Hand signs needed in order
72 // not to break Emoji modifier sequences.
73 0x270A, 0x270D,
71 // Ideographic Description Characters, with CJK Symbols and Punctuation, 74 // Ideographic Description Characters, with CJK Symbols and Punctuation,
72 // excluding 0x3030. 75 // excluding 0x3030.
73 // Then Hiragana 0x3040 .. 0x309F, Katakana 0x30A0 .. 0x30FF, Bopomofo 76 // Then Hiragana 0x3040 .. 0x309F, Katakana 0x30A0 .. 0x30FF, Bopomofo
74 // 0x3100 .. 0x312F 77 // 0x3100 .. 0x312F
75 0x2FF0, 0x302F, 78 0x2FF0, 0x302F,
76 0x3031, 0x312F, 79 0x3031, 0x312F,
77 // More Bopomofo and Bopomofo Extended 0x31A0 .. 0x31BF 80 // More Bopomofo and Bopomofo Extended 0x31A0 .. 0x31BF
78 0x3190, 0x31BF, 81 0x3190, 0x31BF,
79 // Enclosed CJK Letters and Months (0x3200 .. 0x32FF). 82 // Enclosed CJK Letters and Months (0x3200 .. 0x32FF).
80 // CJK Compatibility (0x3300 .. 0x33FF). 83 // CJK Compatibility (0x3300 .. 0x33FF).
81 0x3200, 0x33FF, 84 0x3200, 0x33FF,
82 0xF860, 0xF862, 85 0xF860, 0xF862,
83 // CJK Compatibility Forms. 86 // CJK Compatibility Forms.
84 0xFE30, 0xFE4F, 87 0xFE30, 0xFE4F,
85 // Halfwidth and Fullwidth Forms 88 // Halfwidth and Fullwidth Forms
86 // Usually only used in CJK 89 // Usually only used in CJK
87 0xFF00, 0xFF0C, 90 0xFF00, 0xFF0C,
88 0xFF0E, 0xFF1A, 91 0xFF0E, 0xFF1A,
89 0xFF1F, 0xFFEF, 92 0xFF1F, 0xFFEF,
90 // Emoji. 93 // Emoji.
91 0x1F110, 0x1F129, 94 0x1F110, 0x1F129,
92 0x1F130, 0x1F149, 95 0x1F130, 0x1F149,
93 0x1F150, 0x1F169, 96 0x1F150, 0x1F169,
94 0x1F170, 0x1F189, 97 0x1F170, 0x1F189,
95 0x1F200, 0x1F6FF 98 0x1F200, 0x1F6FF,
99 // Modifiers
100 0x1F3FB, 0x1F3FF,
101 // ZIPPER-MOUTH FACE...SIGN OF THE HORNS
102 0x1F910, 0x1F918
96 }; 103 };
97 104
98 // Individual codepoints needed for Unicode vertical text layout according to 105 // Individual codepoints needed for Unicode vertical text layout according to
99 // http://www.unicode.org/reports/tr50/ 106 // http://www.unicode.org/reports/tr50/
100 // Taken from the corresponding data file: 107 // Taken from the corresponding data file:
101 // http://www.unicode.org/Public/vertical/revision-13/VerticalOrientation-13.txt 108 // http://www.unicode.org/Public/vertical/revision-13/VerticalOrientation-13.txt
102 static const UChar32 isUprightInMixedVerticalArray[] = { 109 static const UChar32 isUprightInMixedVerticalArray[] = {
103 0x000A7, 110 0x000A7,
104 0x000A9, 111 0x000A9,
105 0x000AE, 112 0x000AE,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 0x30000, 0x3FFFD, 222 0x30000, 0x3FFFD,
216 // Supplementary Private Use Area-A 223 // Supplementary Private Use Area-A
217 0xF0000, 0xFFFFD, 224 0xF0000, 0xFFFFD,
218 // Supplementary Private Use Area-B 225 // Supplementary Private Use Area-B
219 0x100000, 0x10FFFD, 226 0x100000, 0x10FFFD,
220 }; 227 };
221 228
222 } // namespace blink 229 } // namespace blink
223 230
224 #endif 231 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698