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

Side by Side Diff: app/gfx/font_win.cc

Issue 113565: Create a new app_strings target that builds strings for the app_base and even... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « app/app.gyp ('k') | app/os_exchange_data_win.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "app/gfx/font.h" 5 #include "app/gfx/font.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 "app/l10n_util_win.h" 12 #include "app/l10n_util_win.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/win_util.h" 14 #include "base/win_util.h"
15 #include "grit/generated_resources.h"
16 15
17 namespace gfx { 16 namespace gfx {
18 17
19 /*static*/ 18 /*static*/
20 Font::HFontRef* Font::base_font_ref_; 19 Font::HFontRef* Font::base_font_ref_;
21 20
22 // 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
23 // font is bold. 22 // font is bold.
24 static const int kTextMetricWeightBold = 700; 23 static const int kTextMetricWeightBold = 700;
25 24
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 203 }
205 if (font_metrics.tmWeight >= kTextMetricWeightBold) { 204 if (font_metrics.tmWeight >= kTextMetricWeightBold) {
206 style |= Font::BOLD; 205 style |= Font::BOLD;
207 } 206 }
208 207
209 return new HFontRef(font, height, baseline, ave_char_width, style, 208 return new HFontRef(font, height, baseline, ave_char_width, style,
210 dlu_base_x); 209 dlu_base_x);
211 } 210 }
212 211
213 } // namespace gfx 212 } // namespace gfx
OLDNEW
« no previous file with comments | « app/app.gyp ('k') | app/os_exchange_data_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698