| 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_PANGO_UTIL_H_ | 5 #ifndef UI_GFX_PANGO_UTIL_H_ |
| 6 #define UI_GFX_PANGO_UTIL_H_ | 6 #define UI_GFX_PANGO_UTIL_H_ |
| 7 | 7 |
| 8 #include <cairo/cairo.h> | 8 #include <cairo/cairo.h> |
| 9 #include <pango/pango.h> | 9 #include <pango/pango.h> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Configures |layout| for the passed-in parameters. | 46 // Configures |layout| for the passed-in parameters. |
| 47 void SetUpPangoLayout( | 47 void SetUpPangoLayout( |
| 48 PangoLayout* layout, | 48 PangoLayout* layout, |
| 49 const base::string16& text, | 49 const base::string16& text, |
| 50 const FontList& font_list, | 50 const FontList& font_list, |
| 51 base::i18n::TextDirection text_direction, | 51 base::i18n::TextDirection text_direction, |
| 52 int flags); | 52 int flags); |
| 53 | 53 |
| 54 // Returns the size in pixels for the specified |pango_font|. | 54 // Returns the size in pixels for the specified |pango_font|. |
| 55 size_t GetPangoFontSizeInPixels(PangoFontDescription* pango_font); | 55 int GetPangoFontSizeInPixels(PangoFontDescription* pango_font); |
| 56 | 56 |
| 57 // Retrieves the Pango metrics for a Pango font description. Caches the metrics | 57 // Retrieves the Pango metrics for a Pango font description. Caches the metrics |
| 58 // and never frees them. The metrics objects are relatively small and very | 58 // and never frees them. The metrics objects are relatively small and very |
| 59 // expensive to look up. | 59 // expensive to look up. |
| 60 PangoFontMetrics* GetPangoFontMetrics(PangoFontDescription* desc); | 60 PangoFontMetrics* GetPangoFontMetrics(PangoFontDescription* desc); |
| 61 | 61 |
| 62 } // namespace gfx | 62 } // namespace gfx |
| 63 | 63 |
| 64 #endif // UI_GFX_PANGO_UTIL_H_ | 64 #endif // UI_GFX_PANGO_UTIL_H_ |
| OLD | NEW |