diff options
author | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-29 22:39:39 +0000 |
---|---|---|
committer | dglazkov@google.com <dglazkov@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-29 22:39:39 +0000 |
commit | ff7560d747b007c4c7921333e9ec4c780ad31cf3 (patch) | |
tree | bd10f401b8d5b93c884569923cb6b9b561ed12e5 /webkit/pending | |
parent | 0e9120dd886ca8ed40261250ed5c1cb9dcf502e3 (diff) | |
download | chromium_src-ff7560d747b007c4c7921333e9ec4c780ad31cf3.zip chromium_src-ff7560d747b007c4c7921333e9ec4c780ad31cf3.tar.gz chromium_src-ff7560d747b007c4c7921333e9ec4c780ad31cf3.tar.bz2 |
Temporarily moved Font::isCJKCodePoint back to SimpleFontData::isCJKCodePoint
TBR
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/pending')
-rw-r--r-- | webkit/pending/Font.cpp | 13 | ||||
-rw-r--r-- | webkit/pending/SimpleFontData.cpp | 15 | ||||
-rw-r--r-- | webkit/pending/SimpleFontData.h | 2 |
3 files changed, 17 insertions, 13 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; } |