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

Unified Diff: Source/core/platform/graphics/FontFallbackList.cpp

Issue 23446007: Use unicode-range to prevent unnecessary @font-face donwnloads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase and add toSegmentedFontData() Created 7 years, 3 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: Source/core/platform/graphics/FontFallbackList.cpp
diff --git a/Source/core/platform/graphics/FontFallbackList.cpp b/Source/core/platform/graphics/FontFallbackList.cpp
index e3405e58e06a26528442f22738945c7f437445d0..a68e8ba94307be88aa7e6dae2ce01d946d256566 100644
--- a/Source/core/platform/graphics/FontFallbackList.cpp
+++ b/Source/core/platform/graphics/FontFallbackList.cpp
@@ -88,6 +88,21 @@ void FontFallbackList::determinePitch(const Font* font) const
}
}
+bool FontFallbackList::loadingCustomFonts() const
+{
+ if (m_loadingCustomFonts)
+ return true;
+
+ unsigned numFonts = m_fontList.size();
+ for (unsigned i = 0; i < numFonts; ++i) {
+ if (m_fontList[i]->isCustomFont() && m_fontList[i]->isLoading()) {
+ m_loadingCustomFonts = true;
+ return true;
+ }
+ }
+ return false;
+}
+
const FontData* FontFallbackList::fontDataAt(const Font* font, unsigned realizedFontIndex) const
{
if (realizedFontIndex < m_fontList.size())
« no previous file with comments | « Source/core/platform/graphics/FontFallbackList.h ('k') | Source/core/platform/graphics/GlyphPageTreeNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698