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

Side by Side Diff: third_party/WebKit/Source/platform/fonts/Character.cpp

Issue 1780723002: Enable Emoji Fitzpatrick modifier sequences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased on renamed CharacterData file 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/CharacterPropertyData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (!U16_IS_TRAIL(next)) 183 if (!U16_IS_TRAIL(next))
184 continue; 184 continue;
185 185
186 UChar32 supplementaryCharacter = U16_GET_SUPPLEMENTARY(c, next); 186 UChar32 supplementaryCharacter = U16_GET_SUPPLEMENTARY(c, next);
187 187
188 if (supplementaryCharacter < 0x1F1E6) // U+1F1E6 through U+1F1FF Reg ional Indicator Symbols 188 if (supplementaryCharacter < 0x1F1E6) // U+1F1E6 through U+1F1FF Reg ional Indicator Symbols
189 continue; 189 continue;
190 if (supplementaryCharacter <= 0x1F1FF) 190 if (supplementaryCharacter <= 0x1F1FF)
191 return ComplexPath; 191 return ComplexPath;
192 192
193 // Emoji Fitzpatrick modifiers trigger upgrade to complex path for s haping them.
194 if (supplementaryCharacter < 0x1F3FB)
195 continue;
196 if (supplementaryCharacter <= 0x1F3FF)
197 return ComplexPath;
198
193 // Man and Woman Emojies, 199 // Man and Woman Emojies,
194 // in order to support emoji joiner combinations for family and coup le pictographs. 200 // in order to support emoji joiner combinations for family and coup le pictographs.
195 // Compare http://unicode.org/reports/tr51/#Emoji_ZWJ_Sequences 201 // Compare http://unicode.org/reports/tr51/#Emoji_ZWJ_Sequences
196 if (supplementaryCharacter < 0x1F468) 202 if (supplementaryCharacter < 0x1F468)
197 continue; 203 continue;
198 if (supplementaryCharacter <= 0x1F469) 204 if (supplementaryCharacter <= 0x1F469)
199 return ComplexPath; 205 return ComplexPath;
200 206
201 if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Uni code variation selectors. 207 if (supplementaryCharacter < 0xE0100) // U+E0100 through U+E01EF Uni code variation selectors.
202 continue; 208 continue;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 354 }
349 355
350 bool Character::isCommonOrInheritedScript(UChar32 character) 356 bool Character::isCommonOrInheritedScript(UChar32 character)
351 { 357 {
352 UErrorCode status = U_ZERO_ERROR; 358 UErrorCode status = U_ZERO_ERROR;
353 UScriptCode script = uscript_getScript(character, &status); 359 UScriptCode script = uscript_getScript(character, &status);
354 return U_SUCCESS(status) && (script == USCRIPT_COMMON || script == USCRIPT_I NHERITED); 360 return U_SUCCESS(status) && (script == USCRIPT_COMMON || script == USCRIPT_I NHERITED);
355 } 361 }
356 362
357 } // namespace blink 363 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/fonts/CharacterPropertyData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698