| 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;
|
|
|