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

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

Issue 1685053002: blink fonts: Load Android SkFontMgr on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@windows_change
Patch Set: Rebase. Created 4 years, 10 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/FontCache.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.h b/third_party/WebKit/Source/platform/fonts/FontCache.h
index 6de5ce2d5f00701824faff638153d7fe0ff0a8e4..c77c06fac7ca8253b4908552db8636c60f0154d0 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.h
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.h
@@ -45,9 +45,7 @@
#include "wtf/text/WTFString.h"
#include <limits.h>
-#if OS(WIN)
#include "SkFontMgr.h"
-#endif
class SkTypeface;
@@ -107,13 +105,14 @@ public:
unsigned short generation();
void invalidate();
+ SkFontMgr* fontManager() { return m_fontManager.get(); }
+ static void setFontManager(const RefPtr<SkFontMgr>&);
+
#if OS(WIN)
bool useSubpixelPositioning() const { return s_useSubpixelPositioning; }
- SkFontMgr* fontManager() { return m_fontManager.get(); }
static bool useDirectWrite() { return s_useDirectWrite; }
static float deviceScaleFactor() { return s_deviceScaleFactor; }
static void setUseDirectWrite(bool useDirectWrite) { s_useDirectWrite = useDirectWrite; }
- static void setFontManager(const RefPtr<SkFontMgr>&);
static void setDeviceScaleFactor(float deviceScaleFactor) { s_deviceScaleFactor = deviceScaleFactor; }
static void setUseSubpixelPositioning(bool useSubpixelPositioning) { s_useSubpixelPositioning = useSubpixelPositioning; }
static void addSideloadedFontForTesting(SkTypeface*);
@@ -178,6 +177,10 @@ private:
// Implemented on skia platforms.
PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFaceCreationParams&, CString& name);
+#if OS(ANDROID) || OS(LINUX)
+ static AtomicString getFamilyNameForCharacter(SkFontMgr*, UChar32, const FontDescription&);
+#endif
+
PassRefPtr<SimpleFontData> fallbackOnStandardFontStyle(const FontDescription&, UChar32);
template <FontFallbackPriority fallbackPriority>
@@ -188,10 +191,11 @@ private:
// Don't purge if this count is > 0;
int m_purgePreventCount;
-#if OS(WIN)
RefPtr<SkFontMgr> m_fontManager;
- static bool s_useDirectWrite;
static SkFontMgr* s_fontManager;
+
+#if OS(WIN)
+ static bool s_useDirectWrite;
static float s_deviceScaleFactor;
static bool s_useSubpixelPositioning;
static HashMap<String, RefPtr<SkTypeface>>* s_sideloadedFonts;

Powered by Google App Engine
This is Rietveld 408576698