| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. |
| 64 // TODO(derat): s/WebKit/Blink/ |
| 61 GFX_EXPORT const FontRenderParams& GetDefaultWebKitFontRenderParams(); | 65 GFX_EXPORT const FontRenderParams& GetDefaultWebKitFontRenderParams(); |
| 62 | 66 |
| 63 // Returns the system's default parameters for WebKit subpixel positioning. | 67 // Returns the appropriate parameters for rendering the font described by the |
| 64 // Subpixel positioning is special since neither GTK nor FontConfig currently | 68 // passed-in-arguments, any of which may be NULL. If |family_out| is non-NULL, |
| 65 // track it as a preference. | 69 // it will be updated to contain the recommended font family from |family_list|. |
| 66 // See https://bugs.freedesktop.org/show_bug.cgi?id=50736 | 70 GFX_EXPORT FontRenderParams GetCustomFontRenderParams( |
| 67 GFX_EXPORT bool GetDefaultWebkitSubpixelPositioning(); | 71 bool for_web_contents, |
| 72 const std::vector<std::string>* family_list, |
| 73 const int* pixel_size, |
| 74 const int* point_size, |
| 75 std::string* family_out); |
| 68 | 76 |
| 69 } // namespace gfx | 77 } // namespace gfx |
| 70 | 78 |
| 71 #endif // UI_GFX_FONT_RENDER_PARAMS_H_ | 79 #endif // UI_GFX_FONT_RENDER_PARAMS_H_ |
| OLD | NEW |