diff options
Diffstat (limited to 'ui/gfx/pango_util.cc')
-rw-r--r-- | ui/gfx/pango_util.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/gfx/pango_util.cc b/ui/gfx/pango_util.cc index ca129b1..638f77c 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); |