summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/pending/Font.cpp13
-rw-r--r--webkit/pending/SimpleFontData.cpp15
-rw-r--r--webkit/pending/SimpleFontData.h2
-rw-r--r--webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp2
4 files changed, 18 insertions, 14 deletions
diff --git a/webkit/pending/Font.cpp b/webkit/pending/Font.cpp
index ef3091d..04dd928 100644
--- a/webkit/pending/Font.cpp
+++ b/webkit/pending/Font.cpp
@@ -809,17 +809,4 @@ FontSelector* Font::fontSelector() const
return m_fontList ? m_fontList->fontSelector() : 0;
}
-// static
-bool Font::isCJKCodePoint(UChar32 c)
-{
- // AC00..D7AF; Hangul Syllables
- if ((0xAC00 <= c) && (c <= 0xD7AF))
- return true;
-
- // CJK ideographs
- UErrorCode errorCode;
- return uscript_getScript(c, &errorCode) == USCRIPT_HAN &&
- U_SUCCESS(errorCode);
-}
-
}
diff --git a/webkit/pending/SimpleFontData.cpp b/webkit/pending/SimpleFontData.cpp
index 54abade..6563196 100644
--- a/webkit/pending/SimpleFontData.cpp
+++ b/webkit/pending/SimpleFontData.cpp
@@ -234,4 +234,19 @@ float CJKWidthFontData::widthForGlyph(Glyph glyph) const
return width;
}
+// static
+// TODO(dglazkov): Move to Font::isCJKCodePoint for consistency
+bool SimpleFontData::isCJKCodePoint(UChar32 c)
+{
+ // AC00..D7AF; Hangul Syllables
+ if ((0xAC00 <= c) && (c <= 0xD7AF))
+ return true;
+
+ // CJK ideographs
+ UErrorCode errorCode;
+ return uscript_getScript(c, &errorCode) == USCRIPT_HAN &&
+ U_SUCCESS(errorCode);
+}
+
+
} // namespace WebCore
diff --git a/webkit/pending/SimpleFontData.h b/webkit/pending/SimpleFontData.h
index 1ebdeaa..34112bc 100644
--- a/webkit/pending/SimpleFontData.h
+++ b/webkit/pending/SimpleFontData.h
@@ -82,6 +82,8 @@ public:
void determinePitch();
Pitch pitch() const { return m_treatAsFixedPitch ? FixedPitch : VariablePitch; }
+ static bool isCJKCodePoint(UChar32 c);
+
#if ENABLE(SVG_FONTS)
SVGFontData* svgFontData() const { return m_svgFontData.get(); }
bool isSVGFont() const { return m_svgFontData; }
diff --git a/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp b/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp
index 185aa44..de73a83 100644
--- a/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp
+++ b/webkit/port/platform/graphics/GlyphPageTreeNodeWin.cpp
@@ -162,7 +162,7 @@ static bool FillBMPGlyphs(UChar* buffer,
glyph = 0;
glyphFontData = 0;
} else {
- if (Font::isCJKCodePoint(c))
+ if (SimpleFontData::isCJKCodePoint(c))
glyphFontData = fontData->cjkWidthFontData();
have_glyphs = true;
}