| Index: Source/platform/fonts/FontCache.h
|
| diff --git a/Source/platform/fonts/FontCache.h b/Source/platform/fonts/FontCache.h
|
| index 9b6ac54a3e6f6936b2638fbf4fa6e623bba1125e..ef9873cf7fcb7a27fc16cc747aabc59d14f920a1 100644
|
| --- a/Source/platform/fonts/FontCache.h
|
| +++ b/Source/platform/fonts/FontCache.h
|
| @@ -110,6 +110,16 @@ public:
|
| static void setDeviceScaleFactor(float deviceScaleFactor) { s_deviceScaleFactor = deviceScaleFactor; }
|
| static void setUseSubpixelPositioning(bool useSubpixelPositioning) { s_useSubpixelPositioning = useSubpixelPositioning; }
|
| static void addSideloadedFontForTesting(SkTypeface*);
|
| + // Functions to cache and retrieve the system font metrics.
|
| + static void setMenuFontMetrics(const wchar_t* familyName, int32_t fontHeight);
|
| + static void setSmallCaptionFontMetrics(const wchar_t* familyName, int32_t fontHeight);
|
| + static void setStatusFontMetrics(const wchar_t* familyName, int32_t fontHeight);
|
| + static int32_t menuFontHeight() { return s_menuFontHeight; }
|
| + static const AtomicString& menuFontFamily() { return *s_smallCaptionFontFamilyName; }
|
| + static int32_t smallCaptionFontHeight() { return s_smallCaptionFontHeight; }
|
| + static const AtomicString& smallCaptionFontFamily() { return *s_smallCaptionFontFamilyName; }
|
| + static int32_t statusFontHeight() { return s_statusFontHeight; }
|
| + static const AtomicString& statusFontFamily() { return *s_statusFontFamilyName; }
|
| #endif
|
|
|
| typedef uint32_t FontFileKey;
|
| @@ -165,6 +175,13 @@ private:
|
| static float s_deviceScaleFactor;
|
| static bool s_useSubpixelPositioning;
|
| static HashMap<String, RefPtr<SkTypeface> >* s_sideloadedFonts;
|
| + // The system font metrics cache.
|
| + static AtomicString* s_menuFontFamilyName;
|
| + static int32_t s_menuFontHeight;
|
| + static AtomicString* s_smallCaptionFontFamilyName;
|
| + static int32_t s_smallCaptionFontHeight;
|
| + static AtomicString* s_statusFontFamilyName;
|
| + static int32_t s_statusFontHeight;
|
| #endif
|
|
|
| #if OS(MACOSX) || OS(ANDROID)
|
|
|