Skip to content

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 ade1f99c to fix “text drawing in RTL mode in text beside icons”, but text besides icons is long gone AFAICT.

Here are two screenshots before and after the patch: nautilus-old nautilus-new

Merge request reports