[nautilus] canvas-item: Let Pango detect base direction
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] canvas-item: Let Pango detect base direction
- Date: Fri, 23 Mar 2018 17:58:51 +0000 (UTC)
commit 42fe131d202c2ad6cbe4456a614d3b949a255e66
Author: Khaled Hosny <khaledhosny eglug org>
Date: Fri Mar 23 13:22:58 2018 +0200
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.
src/nautilus-canvas-item.c | 1 -
1 file changed, 1 deletion(-)
---
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]