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

Unified Diff: Source/platform/fonts/Character.h

Issue 1144033004: Unicode Variation Selectors support in collectCandidateRuns (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Avoid using wcslen() in tests Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/platform/fonts/shaping/HarfBuzzShaper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/Character.h
diff --git a/Source/platform/fonts/Character.h b/Source/platform/fonts/Character.h
index b2a76fe5ceb69ebd3e487344597e32da0f04c486..eeffbc68ee348496f5b436a679f83769dea155a9 100644
--- a/Source/platform/fonts/Character.h
+++ b/Source/platform/fonts/Character.h
@@ -51,6 +51,14 @@ public:
return character >= lowerBound && character <= upperBound;
}
+ static inline bool isUnicodeVariationSelector(UChar32 character)
+ {
+ // http://www.unicode.org/Public/UCD/latest/ucd/StandardizedVariants.html
+ return isInRange(character, 0x180B, 0x180D) // MONGOLIAN FREE VARIATION SELECTOR ONE to THREE
+ || isInRange(character, 0xFE00, 0xFE0F) // VARIATION SELECTOR-1 to 16
+ || isInRange(character, 0xE0100, 0xE01EF); // VARIATION SELECTOR-17 to 256
+ }
+
static bool isCJKIdeograph(UChar32);
static bool isCJKIdeographOrSymbol(UChar32);
« no previous file with comments | « no previous file | Source/platform/fonts/shaping/HarfBuzzShaper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698