summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/Font.cpp
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2010-11-18 17:33:13 -0800
committerRussell Brenner <russellbrenner@google.com>2010-12-02 13:47:21 -0800
commit6b70adc33054f8aee8c54d0f460458a9df11b8a5 (patch)
tree103a13998c33944d6ab3b8318c509a037e639460 /WebCore/platform/graphics/Font.cpp
parentbdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa (diff)
downloadexternal_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.zip
external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.gz
external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.bz2
Merge WebKit at r72274: Initial merge by git.
Change-Id: Ie51f0b4a16da82942bd516dce59cfb79ebbe25fb
Diffstat (limited to 'WebCore/platform/graphics/Font.cpp')
-rw-r--r--WebCore/platform/graphics/Font.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/Font.cpp b/WebCore/platform/graphics/Font.cpp
index a0cf5a4..6bbf3d7 100644
--- a/WebCore/platform/graphics/Font.cpp
+++ b/WebCore/platform/graphics/Font.cpp
@@ -336,4 +336,73 @@ Font::CodePath Font::codePath(const TextRun& run) const
return result;
}
+bool Font::isCJKIdeograph(UChar32 c)
+{
+ // The basic CJK Unified Ideographs block.
+ if (c >= 0x4E00 && c <= 0x9FFF)
+ return true;
+
+ // CJK Unified Ideographs Extension A.
+ if (c >= 0x3400 && c <= 0x4DBF)
+ return true;
+
+ // CJK Radicals Supplement.
+ if (c >= 0x2E80 && c <= 0x2EFF)
+ return true;
+
+ // Kangxi Radicals.
+ if (c >= 0x2F00 && c <= 0x2FDF)
+ return true;
+
+ // Ideographic Description Characters.
+ if (c >= 0x2FF0 && c <= 0x2FFF)
+ return true;
+
+ // CJK Symbols and Punctuation.
+ if (c >= 0x3000 && c <= 0x303F)
+ return true;
+
+ // CJK Strokes.
+ if (c >= 0x31C0 && c <= 0x31EF)
+ return true;
+
+ // Enclosed CJK Letters and Months.
+ if (c >= 0x3200 && c <= 0x32FF)
+ return true;
+
+ // CJK Compatibility.
+ if (c >= 0x3300 && c <= 0x33FF)
+ return true;
+
+ // CJK Compatibility Ideographs.
+ if (c >= 0xF900 && c <= 0xFAFF)
+ return true;
+
+ // CJK Compatibility Forms.
+ if (c >= 0xFE30 && c <= 0xFE4F)
+ return true;
+
+ // Emoji.
+ if (c >= 0x1F200 && c <= 0x1F6F)
+ return true;
+
+ // CJK Unified Ideographs Extension B.
+ if (c >= 0x20000 && c <= 0x2A6DF)
+ return true;
+
+ // CJK Unified Ideographs Extension C.
+ if (c >= 0x2A700 && c <= 0x2B73F)
+ return true;
+
+ // CJK Unified Ideographs Extension D.
+ if (c >= 0x2B740 && c <= 0x2B81F)
+ return true;
+
+ // CJK Compatibility Ideographs Supplement.
+ if (c >= 0x2F800 && c <= 0x2FA1F)
+ return true;
+
+ return false;
+}
+
}