Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: ui/gfx/pango_util.cc

Issue 10807082: Add RenderText DirectionalityMode enum and support; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove errant blank line. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/pango_util.h ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/pango_util.cc
diff --git a/ui/gfx/pango_util.cc b/ui/gfx/pango_util.cc
index ca129b12a7b47c55e19313c8b343985bb2a35b98..638f77c603982fe366d9f28ac9f126be80f8dd72 100644
--- a/ui/gfx/pango_util.cc
+++ b/ui/gfx/pango_util.cc
@@ -204,9 +204,11 @@ static void SetupPangoLayoutWithoutFont(
cairo_font_options = NULL;
}
- // Callers of DrawStringInt handle RTL layout themselves, so tell pango to not
- // scope out RTL characters.
+ // Set Pango's base text direction explicitly from |text_direction|.
pango_layout_set_auto_dir(layout, FALSE);
+ pango_context_set_base_dir(pango_layout_get_context(layout),
+ (text_direction == base::i18n::RIGHT_TO_LEFT ?
+ PANGO_DIRECTION_RTL : PANGO_DIRECTION_LTR));
if (width > 0)
pango_layout_set_width(layout, width * PANGO_SCALE);
« no previous file with comments | « ui/gfx/pango_util.h ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698