summaryrefslogtreecommitdiffstats
path: root/ui/gfx/pango_util.h
diff options
context:
space:
mode:
authorxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 19:41:30 +0000
committerxji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 19:41:30 +0000
commit8d901a8c3eb3ce0ca7e085a838fa162a392e8057 (patch)
treea3af28c8ad05b198f9374deaab9136374b473348 /ui/gfx/pango_util.h
parent10a67c12d7cff7b3df6e98c9dabb6ec77353ad01 (diff)
downloadchromium_src-8d901a8c3eb3ce0ca7e085a838fa162a392e8057.zip
chromium_src-8d901a8c3eb3ce0ca7e085a838fa162a392e8057.tar.gz
chromium_src-8d901a8c3eb3ce0ca7e085a838fa162a392e8057.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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114953 Review URL: http://codereview.chromium.org/8770034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/pango_util.h')
-rw-r--r--ui/gfx/pango_util.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/gfx/pango_util.h b/ui/gfx/pango_util.h
index 903e6df..544d21d 100644
--- a/ui/gfx/pango_util.h
+++ b/ui/gfx/pango_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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,16 @@ 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,