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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontFallbackIterator.h

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/FontFallbackIterator.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.h b/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.h
index 2fc019b0da5d4ea32c8edae945223ef5347348bf..2d3a58cbc357533f951f46db6a53e37b383e4f08 100644
--- a/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.h
+++ b/third_party/WebKit/Source/platform/fonts/FontFallbackIterator.h
@@ -39,13 +39,15 @@ public:
// Some system fallback APIs (Windows, Android) require a character, or a
// portion of the string to be passed. On Mac and Linux, we get a list of
// fonts without passing in characters.
- const SimpleFontData* next(const Vector<UChar32>& hintList);
+ const FontDataRange next(const Vector<UChar32>& hintList);
private:
FontFallbackIterator(const FontDescription&, PassRefPtr<FontFallbackList>);
+ bool rangeContributesForHint(const Vector<UChar32> hintList, const FontDataRange&);
+ bool alreadyLoadingRangeForHintChar(UChar32 hintChar);
void willUseRange(const AtomicString& family, const FontDataRange&);
- const SimpleFontData* uniqueSystemFontForHint(UChar32 hint);
+ const PassRefPtr<SimpleFontData> uniqueSystemFontForHint(UChar32 hint);
const FontDescription& m_fontDescription;
RefPtr<FontFallbackList> m_fontFallbackList;
@@ -63,6 +65,7 @@ private:
FallbackStage m_fallbackStage;
const FontFamily* m_currentFamily;
HashMap<UChar32, RefPtr<SimpleFontData>> m_visitedSystemFonts;
+ Vector<FontDataRange> m_loadingCustomFontForRanges;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698