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

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

Issue 6312156: Change includes of gfx/* to ui/gfx/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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
« no previous file with comments | « ui/gfx/platform_font_win.h ('k') | ui/gfx/point.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "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>
11 11
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "base/win/win_util.h" 15 #include "base/win/win_util.h"
16 #include "gfx/canvas_skia.h" 16 #include "ui/gfx/canvas_skia.h"
17 #include "gfx/font.h" 17 #include "ui/gfx/font.h"
18 18
19 namespace { 19 namespace {
20 20
21 // If the tmWeight field of a TEXTMETRIC structure has a value >= this, the 21 // If the tmWeight field of a TEXTMETRIC structure has a value >= this, the
22 // font is bold. 22 // font is bold.
23 const int kTextMetricWeightBold = 700; 23 const int kTextMetricWeightBold = 700;
24 24
25 // Returns either minimum font allowed for a current locale or 25 // Returns either minimum font allowed for a current locale or
26 // lf_height + size_delta value. 26 // lf_height + size_delta value.
27 int AdjustFontSize(int lf_height, int size_delta) { 27 int AdjustFontSize(int lf_height, int size_delta) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 return new PlatformFontWin(native_font); 260 return new PlatformFontWin(native_font);
261 } 261 }
262 262
263 // static 263 // static
264 PlatformFont* PlatformFont::CreateFromNameAndSize(const string16& font_name, 264 PlatformFont* PlatformFont::CreateFromNameAndSize(const string16& font_name,
265 int font_size) { 265 int font_size) {
266 return new PlatformFontWin(font_name, font_size); 266 return new PlatformFontWin(font_name, font_size);
267 } 267 }
268 268
269 } // namespace gfx 269 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/platform_font_win.h ('k') | ui/gfx/point.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698