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

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

Issue 413003002: Add FontRenderParamsQuery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« ui/gfx/font_render_params.h ('K') | « ui/gfx/platform_font_pango.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/platform_font_win.h" 5 #include "ui/gfx/platform_font_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 if (length <= 0) 186 if (length <= 0)
187 return GetFontName(); 187 return GetFontName();
188 return base::SysWideToUTF8(localized_font_name); 188 return base::SysWideToUTF8(localized_font_name);
189 } 189 }
190 190
191 int PlatformFontWin::GetFontSize() const { 191 int PlatformFontWin::GetFontSize() const {
192 return font_ref_->font_size(); 192 return font_ref_->font_size();
193 } 193 }
194 194
195 const FontRenderParams& PlatformFontWin::GetFontRenderParams() const { 195 const FontRenderParams& PlatformFontWin::GetFontRenderParams() const {
196 return GetDefaultFontRenderParams(); 196 return gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(false), NULL);
197 } 197 }
198 198
199 NativeFont PlatformFontWin::GetNativeFont() const { 199 NativeFont PlatformFontWin::GetNativeFont() const {
200 return font_ref_->hfont(); 200 return font_ref_->hfont();
201 } 201 }
202 202
203 //////////////////////////////////////////////////////////////////////////////// 203 ////////////////////////////////////////////////////////////////////////////////
204 // Font, private: 204 // Font, private:
205 205
206 void PlatformFontWin::InitWithCopyOfHFONT(HFONT hfont) { 206 void PlatformFontWin::InitWithCopyOfHFONT(HFONT hfont) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 return new PlatformFontWin(native_font); 374 return new PlatformFontWin(native_font);
375 } 375 }
376 376
377 // static 377 // static
378 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name, 378 PlatformFont* PlatformFont::CreateFromNameAndSize(const std::string& font_name,
379 int font_size) { 379 int font_size) {
380 return new PlatformFontWin(font_name, font_size); 380 return new PlatformFontWin(font_name, font_size);
381 } 381 }
382 382
383 } // namespace gfx 383 } // namespace gfx
OLDNEW
« ui/gfx/font_render_params.h ('K') | « ui/gfx/platform_font_pango.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698