Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / platform / fonts / skia / FontPlatformDataSkia.cpp
index ed0de7e..e7d48b2 100644 (file)
@@ -35,7 +35,7 @@
 #include "SkTypeface.h"
 #include "platform/fonts/FontCache.h"
 
-namespace WebCore {
+namespace blink {
 
 #if !OS(MACOSX)
 unsigned FontPlatformData::hash() const
@@ -53,6 +53,17 @@ unsigned FontPlatformData::hash() const
     return h;
 }
 
+bool FontPlatformData::fontContainsCharacter(UChar32 character)
+{
+    SkPaint paint;
+    setupPaint(&paint);
+    paint.setTextEncoding(SkPaint::kUTF32_TextEncoding);
+
+    uint16_t glyph;
+    paint.textToGlyphs(&character, sizeof(character), &glyph);
+    return glyph;
+}
+
 #endif
 
 #if ENABLE(OPENTYPE_VERTICAL)
@@ -76,4 +87,4 @@ PassRefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const
 }
 #endif
 
-} // namespace WebCore
+} // namespace blink