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

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

Issue 2054273002: Font fallback for UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually delete old TextAnalysisSource Created 4 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
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 #ifndef UI_GFX_PLATFORM_FONT_WIN_H_ 5 #ifndef UI_GFX_PLATFORM_FONT_WIN_H_
6 #define UI_GFX_PLATFORM_FONT_WIN_H_ 6 #define UI_GFX_PLATFORM_FONT_WIN_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "ui/gfx/gfx_export.h" 14 #include "ui/gfx/gfx_export.h"
15 #include "ui/gfx/platform_font.h" 15 #include "ui/gfx/platform_font.h"
16 16
17 struct IDWriteFactory; 17 struct IDWriteFactory;
18 struct IDWriteFont;
18 19
19 namespace gfx { 20 namespace gfx {
20 21
22 // Returns the family name for the |IDWriteFont| interface passed in.
23 // The family name is returned in the |family_name_ret| parameter.
msw 2016/06/23 20:59:38 nit: rename the param |family_name| or |family_nam
Ilya Kulshin 2016/06/24 20:48:24 Done.
24 // Returns S_OK on success.
25 HRESULT GetFamilyNameFromDirectWriteFont(IDWriteFont* dwrite_font,
msw 2016/06/23 20:59:38 nit: move below class decl
Ilya Kulshin 2016/06/24 20:48:24 Done.
26 base::string16* family_name_ret);
27
21 class GFX_EXPORT PlatformFontWin : public PlatformFont { 28 class GFX_EXPORT PlatformFontWin : public PlatformFont {
22 public: 29 public:
23 PlatformFontWin(); 30 PlatformFontWin();
24 explicit PlatformFontWin(NativeFont native_font); 31 explicit PlatformFontWin(NativeFont native_font);
25 PlatformFontWin(const std::string& font_name, int font_size); 32 PlatformFontWin(const std::string& font_name, int font_size);
26 33
27 // Dialog units to pixels conversion. 34 // Dialog units to pixels conversion.
28 // See http://support.microsoft.com/kb/145994 for details. 35 // See http://support.microsoft.com/kb/145994 for details.
29 int horizontal_dlus_to_pixels(int dlus) const { 36 int horizontal_dlus_to_pixels(int dlus) const {
30 return dlus * font_ref_->GetDluBaseX() / 4; 37 return dlus * font_ref_->GetDluBaseX() / 4;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 207
201 // Pointer to the global IDWriteFactory interface. 208 // Pointer to the global IDWriteFactory interface.
202 static IDWriteFactory* direct_write_factory_; 209 static IDWriteFactory* direct_write_factory_;
203 210
204 DISALLOW_COPY_AND_ASSIGN(PlatformFontWin); 211 DISALLOW_COPY_AND_ASSIGN(PlatformFontWin);
205 }; 212 };
206 213
207 } // namespace gfx 214 } // namespace gfx
208 215
209 #endif // UI_GFX_PLATFORM_FONT_WIN_H_ 216 #endif // UI_GFX_PLATFORM_FONT_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698