summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2018-03-23 13:22:58 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2018-03-23 18:48:10 +0200
commit42fe131d202c2ad6cbe4456a614d3b949a255e66 (patch)
tree8965a378db25ec500301afaae1ba8023e626108e
parent774fb822bcd1e2631f12584696347f237f10a999 (diff)
downloadnautilus-42fe131d202c2ad6cbe4456a614d3b949a255e66.tar.gz
canvas-item: Let Pango detect base direction
When using right-to-left (RTL) UI, files that start with neutral or weak directional characters (like punctuation and numbers) while the rest of file name is strong left-to-right (LTR) characters (like Latin characters), the Pango layout base direction should be LTR for proper display of such file names, and Pango can automatically detect that, but canvas item disables automatic detection of base direction and forcing the use of UI direction which leads to broken display if the UI locale is RTL. The reverse can also happen for RTL file names in LTR UI. The pango_layout_set_auto_dir (layout, FALSE) was introduced in commit ade1f99c97 to fix “text drawing in RTL mode in text beside icons”, but text besides icons is long gone AFAICT.
-rw-r--r--src/nautilus-canvas-item.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/nautilus-canvas-item.c b/src/nautilus-canvas-item.c
index 718082051..8047cfeac 100644
--- a/src/nautilus-canvas-item.c
+++ b/src/nautilus-canvas-item.c
@@ -1497,7 +1497,6 @@ create_label_layout (NautilusCanvasItem *item,
}
pango_layout_set_text (layout, zeroified_text, -1);
- pango_layout_set_auto_dir (layout, FALSE);
pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
pango_layout_set_spacing (layout, LABEL_LINE_SPACING);