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

Unified Diff: ui/gfx/font_render_params_win.cc

Issue 785763002: Disable subpixel positioning if DirectWrite isn't initialized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years 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 | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_render_params_win.cc
diff --git a/ui/gfx/font_render_params_win.cc b/ui/gfx/font_render_params_win.cc
index 354d1b248b740e13dfa9e7a815af73f47c6abd9b..9f8409c4eb146996fe2c2714819401e76bb6c848 100644
--- a/ui/gfx/font_render_params_win.cc
+++ b/ui/gfx/font_render_params_win.cc
@@ -6,6 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
+#include "ui/gfx/win/direct_write.h"
#include "ui/gfx/win/singleton_hwnd.h"
namespace gfx {
@@ -34,7 +35,8 @@ class CachedFontRenderParams : public gfx::SingletonHwnd::Observer {
BOOL enabled = false;
if (SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &enabled, 0) && enabled) {
params_->antialiasing = true;
- params_->subpixel_positioning = true;
+ // GDI does not support subpixel positioning.
+ params_->subpixel_positioning = win::IsDirectWriteEnabled();
UINT type = 0;
if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &type, 0) &&
« no previous file with comments | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698