summaryrefslogtreecommitdiffstats
path: root/ui/gfx/pango_util.h
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-19 04:09:01 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-19 04:09:01 +0000
commit732ef6737ef6e1346255be7230032dcaf4e9ad03 (patch)
treec9663673eba42c9f33c413a909c16a37d7bd2ebb /ui/gfx/pango_util.h
parent963c1b96abd9baa3ccddb7bc59da8a93e0c2ae93 (diff)
downloadchromium_src-732ef6737ef6e1346255be7230032dcaf4e9ad03.zip
chromium_src-732ef6737ef6e1346255be7230032dcaf4e9ad03.tar.gz
chromium_src-732ef6737ef6e1346255be7230032dcaf4e9ad03.tar.bz2
specify locale-dependent font list for UI on ChromeOS, so that those fonts have higher priority over the fallback fonts Pango picks up.
BUG=103860 TEST=build aura, start chromium in 'ar' locale. type in Arabic and check the Arabic text's shapes. remove IDS_UI_FONT_FAMILY_CROS from 'ar' resource file, build aura again, start chromium in 'ar', type in Arabic and the Arabic text's shapes should be different. Review URL: http://codereview.chromium.org/8770034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/pango_util.h')
-rw-r--r--ui/gfx/pango_util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/gfx/pango_util.h b/ui/gfx/pango_util.h
index 903e6df..93b9bf2 100644
--- a/ui/gfx/pango_util.h
+++ b/ui/gfx/pango_util.h
@@ -8,6 +8,7 @@
#include <cairo/cairo.h>
#include <pango/pango.h>
+#include <string>
#include "base/i18n/rtl.h"
#include "base/string16.h"
@@ -47,6 +48,17 @@ void SetupPangoLayout(PangoLayout* layout,
base::i18n::TextDirection text_direction,
int flags);
+
+// Setup pango layout |layout| the same way as SetupPangoLayout(), except this
+// sets the font description based on |font_description|.
+void SetupPangoLayoutWithFontDescription(
+ PangoLayout* layout,
+ const string16& text,
+ const std::string& font_description,
+ int width,
+ base::i18n::TextDirection text_direction,
+ int flags);
+
// Get Pango's calculated size of |layout| and modify |text_rect| within
// |bounds|.
void AdjustTextRectBasedOnLayout(PangoLayout* layout,