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

Side by Side Diff: ui/gfx/font.cc

Issue 789583002: Updates subpixel positioning and hinting when DSF is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GN 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gfx/font.h" 5 #include "ui/gfx/font.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/gfx/platform_font.h" 8 #include "ui/gfx/platform_font.h"
9 9
10 namespace gfx { 10 namespace gfx {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 } 67 }
68 68
69 std::string Font::GetActualFontNameForTesting() const { 69 std::string Font::GetActualFontNameForTesting() const {
70 return platform_font_->GetActualFontNameForTesting(); 70 return platform_font_->GetActualFontNameForTesting();
71 } 71 }
72 72
73 int Font::GetFontSize() const { 73 int Font::GetFontSize() const {
74 return platform_font_->GetFontSize(); 74 return platform_font_->GetFontSize();
75 } 75 }
76 76
77 const FontRenderParams& Font::GetFontRenderParams() const { 77 FontRenderParams Font::GetFontRenderParams() const {
78 return platform_font_->GetFontRenderParams(); 78 FontRenderParams params = platform_font_->GetFontRenderParams();
79 gfx::FontRenderParamsRewriter* rewriter =
80 gfx::FontRenderParamsRewriter::GetInstance();
81 if (rewriter)
82 rewriter->RewriteParams(&params);
83 return params;
79 } 84 }
80 85
81 NativeFont Font::GetNativeFont() const { 86 NativeFont Font::GetNativeFont() const {
82 return platform_font_->GetNativeFont(); 87 return platform_font_->GetNativeFont();
83 } 88 }
84 89
85 } // namespace gfx 90 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/font.h ('k') | ui/gfx/font_render_params.h » ('j') | ui/gfx/font_render_params.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698