Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(947)

Unified Diff: third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp

Issue 1397423004: Improve shaping segmentation for grapheme cluster based font fallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge TestExpectations with the HarfBuzz rebaselines Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
index b7b7926644c5303994b11d0a0f7d9dc2bc13ffda..b461d6e746b077d2423dcfbfe7e0b18eb34e10f6 100644
--- a/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
+++ b/third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
@@ -452,33 +452,6 @@ float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
return SkScalarToFloat(width);
}
-bool SimpleFontData::canRenderCombiningCharacterSequence(const UChar* characters, size_t length) const
-{
- if (!m_combiningCharacterSequenceSupport)
- m_combiningCharacterSequenceSupport = adoptPtr(new HashMap<String, bool>);
-
- WTF::HashMap<String, bool>::AddResult addResult = m_combiningCharacterSequenceSupport->add(String(characters, length), false);
- if (!addResult.isNewEntry)
- return addResult.storedValue->value;
-
- UErrorCode error = U_ZERO_ERROR;
- Vector<UChar, 4> normalizedCharacters(length);
- size_t normalizedLength = unorm_normalize(characters, length, UNORM_NFC, UNORM_UNICODE_3_2, &normalizedCharacters[0], length, &error);
- // Can't render if we have an error or no composition occurred.
- if (U_FAILURE(error) || normalizedLength == length)
- return false;
-
- for (size_t offset = 0; offset < normalizedLength;) {
- UChar32 character;
- U16_NEXT(normalizedCharacters, offset, normalizedLength, character);
- if (!glyphForCharacter(character))
- return false;
- }
-
- addResult.storedValue->value = true;
- return true;
-}
-
bool SimpleFontData::fillGlyphPage(GlyphPage* pageToFill, unsigned offset, unsigned length, UChar* buffer, unsigned bufferLength) const
{
if (SkUTF16_IsHighSurrogate(buffer[bufferLength-1])) {

Powered by Google App Engine
This is Rietveld 408576698