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

Unified Diff: Source/core/css/CSSFontFaceSrcValue.cpp

Issue 360203002: Disable SVG Fonts in CSS on all platforms except GDI Windows (XP, Vista) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove svg/custom/acid3-test-77.html change Created 6 years, 6 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
« no previous file with comments | « LayoutTests/svg/custom/svg-font-support-expected.html ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSFontFaceSrcValue.cpp
diff --git a/Source/core/css/CSSFontFaceSrcValue.cpp b/Source/core/css/CSSFontFaceSrcValue.cpp
index f0cde2c59ab0659e7b72379c6ee3d685609eb663..96ecbea73ecefbebbf33e804c6cac3f09590bea7 100644
--- a/Source/core/css/CSSFontFaceSrcValue.cpp
+++ b/Source/core/css/CSSFontFaceSrcValue.cpp
@@ -34,6 +34,7 @@
#include "core/fetch/FontResource.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/svg/SVGFontFaceElement.h"
+#include "platform/fonts/FontCache.h"
#include "platform/fonts/FontCustomPlatformData.h"
#include "wtf/text/StringBuilder.h"
@@ -57,11 +58,20 @@ bool CSSFontFaceSrcValue::isSupportedFormat() const
return true;
}
- return FontCustomPlatformData::supportsFormat(m_format)
+ if (FontCustomPlatformData::supportsFormat(m_format))
+ return true;
+
+ // We have removed SVG font support on non-gdi platforms. For details, see:
+ // https://groups.google.com/a/chromium.org/d/msg/blink-dev/pYbbUcYvlYY/LQvFvM8KZZEJ
#if ENABLE(SVG_FONTS)
- || isSVGFontFaceSrc()
+ if (RuntimeEnabledFeatures::svgFontsOnNonGDIPlatformsEnabled()
+#if OS(WIN)
+ || !FontCache::useDirectWrite()
+#endif
+ )
+ return isSVGFontFaceSrc();
#endif
- ;
+ return false;
}
String CSSFontFaceSrcValue::customCSSText() const
« no previous file with comments | « LayoutTests/svg/custom/svg-font-support-expected.html ('k') | Source/platform/RuntimeEnabledFeatures.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698