OLD | NEW |
---|---|
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_LINUX_H_ | 5 #ifndef UI_GFX_PLATFORM_FONT_LINUX_H_ |
6 #define UI_GFX_PLATFORM_FONT_LINUX_H_ | 6 #define UI_GFX_PLATFORM_FONT_LINUX_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 Font::Weight GetWeight() const override; | 46 Font::Weight GetWeight() const override; |
47 int GetBaseline() override; | 47 int GetBaseline() override; |
48 int GetCapHeight() override; | 48 int GetCapHeight() override; |
49 int GetExpectedTextWidth(int length) override; | 49 int GetExpectedTextWidth(int length) override; |
50 int GetStyle() const override; | 50 int GetStyle() const override; |
51 const std::string& GetFontName() const override; | 51 const std::string& GetFontName() const override; |
52 std::string GetActualFontNameForTesting() const override; | 52 std::string GetActualFontNameForTesting() const override; |
53 int GetFontSize() const override; | 53 int GetFontSize() const override; |
54 const FontRenderParams& GetFontRenderParams() override; | 54 const FontRenderParams& GetFontRenderParams() override; |
55 | 55 |
56 sk_sp<SkTypeface> typeface() const { return std::ref(typeface_); } | |
mthiesse
2017/05/10 15:38:00
remove std::ref, it's not necessary.
| |
57 | |
56 private: | 58 private: |
57 // Create a new instance of this object with the specified properties. Called | 59 // Create a new instance of this object with the specified properties. Called |
58 // from DeriveFont. | 60 // from DeriveFont. |
59 PlatformFontLinux(sk_sp<SkTypeface> typeface, | 61 PlatformFontLinux(sk_sp<SkTypeface> typeface, |
60 const std::string& family, | 62 const std::string& family, |
61 int size_pixels, | 63 int size_pixels, |
62 int style, | 64 int style, |
63 Font::Weight weight, | 65 Font::Weight weight, |
64 const FontRenderParams& params); | 66 const FontRenderParams& params); |
65 ~PlatformFontLinux() override; | 67 ~PlatformFontLinux() override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 // A font description string of the format used by FontList. | 106 // A font description string of the format used by FontList. |
105 static std::string* default_font_description_; | 107 static std::string* default_font_description_; |
106 #endif | 108 #endif |
107 | 109 |
108 DISALLOW_COPY_AND_ASSIGN(PlatformFontLinux); | 110 DISALLOW_COPY_AND_ASSIGN(PlatformFontLinux); |
109 }; | 111 }; |
110 | 112 |
111 } // namespace gfx | 113 } // namespace gfx |
112 | 114 |
113 #endif // UI_GFX_PLATFORM_FONT_LINUX_H_ | 115 #endif // UI_GFX_PLATFORM_FONT_LINUX_H_ |
OLD | NEW |