OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_GFX_PANGO_UTIL_H_ |
| 6 #define UI_GFX_PANGO_UTIL_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <pango/pango.h> |
| 10 #include "base/i18n/rtl.h" |
| 11 #include "base/string16.h" |
| 12 |
| 13 // TODO(xji): move other pango related functions from gtk_util to here. |
| 14 |
| 15 namespace gfx { |
| 16 |
| 17 class Font; |
| 18 |
| 19 // Setup pango layout |layout|, including set layout text as |text|, font |
| 20 // description based on |font|, width as |width| in PANGO_SCALE for RTL lcoale, |
| 21 // and set up whether auto-detect directionality, alignment, ellipsis, word |
| 22 // wrapping, resolution etc. |
| 23 void SetupPangoLayout(PangoLayout* layout, |
| 24 const string16& text, |
| 25 const gfx::Font& font, |
| 26 int width, |
| 27 base::i18n::TextDirection text_direction, |
| 28 int flags); |
| 29 } // namespace gfx |
| 30 |
| 31 #endif // UI_GFX_PANGO_UTIL_H_ |
OLD | NEW |