OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GTK_ | 5 #ifndef UI_GFX_PLATFORM_FONT_GTK_ |
6 #define UI_GFX_PLATFORM_FONT_GTK_ | 6 #define UI_GFX_PLATFORM_FONT_GTK_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "third_party/skia/include/core/SkRefCnt.h" | 10 #include "third_party/skia/include/core/SkRefCnt.h" |
11 #include "ui/gfx/platform_font.h" | 11 #include "ui/gfx/platform_font.h" |
12 | 12 |
13 class SkTypeface; | 13 class SkTypeface; |
14 class SkPaint; | 14 class SkPaint; |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 | 17 |
18 class UI_API PlatformFontGtk : public PlatformFont { | 18 class UI_EXPORT PlatformFontGtk : public PlatformFont { |
19 public: | 19 public: |
20 PlatformFontGtk(); | 20 PlatformFontGtk(); |
21 explicit PlatformFontGtk(const Font& other); | 21 explicit PlatformFontGtk(const Font& other); |
22 explicit PlatformFontGtk(NativeFont native_font); | 22 explicit PlatformFontGtk(NativeFont native_font); |
23 PlatformFontGtk(const string16& font_name, | 23 PlatformFontGtk(const string16& font_name, |
24 int font_size); | 24 int font_size); |
25 | 25 |
26 // Converts |gfx_font| to a new pango font. Free the returned font with | 26 // Converts |gfx_font| to a new pango font. Free the returned font with |
27 // pango_font_description_free(). | 27 // pango_font_description_free(). |
28 static PangoFontDescription* PangoFontFromGfxFont(const gfx::Font& gfx_font); | 28 static PangoFontDescription* PangoFontFromGfxFont(const gfx::Font& gfx_font); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 double underline_position_pixels_; | 103 double underline_position_pixels_; |
104 double underline_thickness_pixels_; | 104 double underline_thickness_pixels_; |
105 | 105 |
106 // The default font, used for the default constructor. | 106 // The default font, used for the default constructor. |
107 static Font* default_font_; | 107 static Font* default_font_; |
108 }; | 108 }; |
109 | 109 |
110 } // namespace gfx | 110 } // namespace gfx |
111 | 111 |
112 #endif // UI_GFX_PLATFORM_FONT_GTK_ | 112 #endif // UI_GFX_PLATFORM_FONT_GTK_ |
OLD | NEW |