Index: third_party/WebKit/Source/platform/fonts/Character.cpp |
diff --git a/third_party/WebKit/Source/platform/fonts/Character.cpp b/third_party/WebKit/Source/platform/fonts/Character.cpp |
index a361f6645fbe31d488b08e087a27c4efa51cbf11..f795cd90f14a18203a591766ee12d1e25a8e6026 100644 |
--- a/third_party/WebKit/Source/platform/fonts/Character.cpp |
+++ b/third_party/WebKit/Source/platform/fonts/Character.cpp |
@@ -33,6 +33,7 @@ |
#include "wtf/StdLibExtras.h" |
#include "wtf/text/StringBuilder.h" |
#include <algorithm> |
+#include <unicode/uscript.h> |
using namespace WTF; |
using namespace Unicode; |
@@ -511,4 +512,11 @@ String Character::normalizeSpaces(const UChar* characters, unsigned length) |
return normalizeSpacesInternal(characters, length); |
} |
+bool Character::isCommonOrInheritedScript(UChar32 character) |
+{ |
+ UErrorCode status = U_ZERO_ERROR; |
+ UScriptCode script = uscript_getScript(character, &status); |
+ return U_SUCCESS(status) && (script == USCRIPT_COMMON || script == USCRIPT_INHERITED); |
+} |
+ |
} // namespace blink |