OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FONT_RENDER_PARAMS_H_ | 5 #ifndef UI_GFX_FONT_RENDER_PARAMS_H_ |
6 #define UI_GFX_FONT_RENDER_PARAMS_H_ | 6 #define UI_GFX_FONT_RENDER_PARAMS_H_ |
7 | 7 |
8 #include <string> | |
9 #include <vector> | |
10 | |
8 #include "ui/gfx/gfx_export.h" | 11 #include "ui/gfx/gfx_export.h" |
9 | 12 |
10 namespace gfx { | 13 namespace gfx { |
11 | 14 |
12 // A collection of parameters describing how text should be rendered on Linux. | 15 // A collection of parameters describing how text should be rendered on Linux. |
13 struct GFX_EXPORT FontRenderParams { | 16 struct GFX_EXPORT FontRenderParams { |
14 FontRenderParams(); | 17 FontRenderParams(); |
15 ~FontRenderParams(); | 18 ~FontRenderParams(); |
16 | 19 |
17 // Level of hinting to be applied. | 20 // Level of hinting to be applied. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 Hinting hinting; | 53 Hinting hinting; |
51 | 54 |
52 // Whether subpixel rendering should be used or not, and if so, the display's | 55 // Whether subpixel rendering should be used or not, and if so, the display's |
53 // subpixel order. | 56 // subpixel order. |
54 SubpixelRendering subpixel_rendering; | 57 SubpixelRendering subpixel_rendering; |
55 }; | 58 }; |
56 | 59 |
57 // Returns the system's default parameters for font rendering. | 60 // Returns the system's default parameters for font rendering. |
58 GFX_EXPORT const FontRenderParams& GetDefaultFontRenderParams(); | 61 GFX_EXPORT const FontRenderParams& GetDefaultFontRenderParams(); |
59 | 62 |
60 // Returns the system's default parameters for WebKit font rendering. | 63 // Returns the system's default parameters for WebKit font rendering. |
msw
2014/07/12 00:27:31
optional [followup] nit: update the WebKit name an
Daniel Erat
2014/07/12 01:55:32
added a todo and will do it in a later change (sin
msw
2014/07/12 02:26:40
sgtm, thanks
| |
61 GFX_EXPORT const FontRenderParams& GetDefaultWebKitFontRenderParams(); | 64 GFX_EXPORT const FontRenderParams& GetDefaultWebKitFontRenderParams(); |
62 | 65 |
66 // Returns the appropriate parameters for rendering the font described by the | |
67 // passed-in-arguments, any of which may be NULL. If |family_out| is non-NULL, | |
68 // it will be updated to contain the recommended font family from |family_list|. | |
69 GFX_EXPORT FontRenderParams GetCustomFontRenderParams( | |
70 bool renderer, | |
msw
2014/07/12 00:27:32
nit: clarify this in name |for_web_contents|? or i
Daniel Erat
2014/07/12 01:55:32
Done.
| |
71 const std::vector<std::string>* family_list, | |
72 const int* pixel_size, | |
73 const int* point_size, | |
74 std::string* family_out); | |
Daniel Erat
2014/07/11 17:15:29
returning the font family here seems a bit out of
msw
2014/07/12 00:27:31
Acknowledged.
| |
75 | |
63 // Returns the system's default parameters for WebKit subpixel positioning. | 76 // Returns the system's default parameters for WebKit subpixel positioning. |
msw
2014/07/12 00:27:31
optional [followup] nit: update the WebKit name an
Daniel Erat
2014/07/12 01:55:32
done (my favorite part is "WebKit" in the earlier
| |
64 // Subpixel positioning is special since neither GTK nor FontConfig currently | 77 // Subpixel positioning is special since neither GTK nor FontConfig currently |
65 // track it as a preference. | 78 // track it as a preference. |
66 // See https://bugs.freedesktop.org/show_bug.cgi?id=50736 | 79 // See https://bugs.freedesktop.org/show_bug.cgi?id=50736 |
67 GFX_EXPORT bool GetDefaultWebkitSubpixelPositioning(); | 80 GFX_EXPORT bool GetDefaultWebkitSubpixelPositioning(); |
68 | 81 |
69 } // namespace gfx | 82 } // namespace gfx |
70 | 83 |
71 #endif // UI_GFX_FONT_RENDER_PARAMS_H_ | 84 #endif // UI_GFX_FONT_RENDER_PARAMS_H_ |
OLD | NEW |