From bd04cc312a5bc7b454d2aba317f3357b367a6d34 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen <allan.jensen@digia.com> Date: Tue, 19 Aug 2014 17:03:43 +0200 Subject: [PATCH] <chromium> Fix medium hinting on Linux with fontconfig and freetype Skia freetype will enforce slight hinting in SkTypeface_FreeType::onFilterRec when subpixel positioning is enabled. To avoid overriding medium hinting with slight, we should not enable subpixel positioning for medium hinting similar to how it is avoided for full hinting as well. Change-Id: I4a229cf2b8827c11f33789d1c35c2d0eaeaed0ae Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> --- .../platform/fonts/linux/FontPlatformDataLinuxHarfBuzz.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chromium/third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinuxHarfBuzz.cpp b/chromium/third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinuxHarfBuzz.cpp index c05fa20be98..430f6b756ef 100644 --- a/chromium/third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinuxHarfBuzz.cpp +++ b/chromium/third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinuxHarfBuzz.cpp @@ -83,7 +83,7 @@ void FontPlatformData::setupPaint(SkPaint* paint, GraphicsContext*) const // TestRunner specifically toggles the subpixel positioning flag. if (RuntimeEnabledFeatures::subpixelFontScalingEnabled() - && paint->getHinting() != SkPaint::kFull_Hinting + && paint->getHinting() < SkPaint::kNormal_Hinting && !isRunningLayoutTest()) paint->setSubpixelText(true); else -- GitLab