- Foot Version:
foot version: 1.9.2-39-g6dfacb9c (Oct 20 2021, branch 'master') +pgo +ime +graphemes
- Log output:
info: main.c:402: version: 1.9.2-39-g6dfacb9c (Oct 20 2021, branch 'master') +pgo +ime +graphemes
info: main.c:409: arch: Linux x86_64/64-bit
info: main.c:416: locale: en_US.UTF-8
info: config.c:3064: loading configuration from /home/siavash/.config/foot/foot.ini
info: fcft.c:267: fcft: 2.4.5 +graphemes +runs
info: fcft.c:277: fontconfig: 2.13.94
info: fcft.c:283: freetype: 2.11.0
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Regular.ttf: size=8.00pt/8px, dpi=75.00
info: wayland.c:1275: DVI-I-1: 1920x1200+1920x0@60Hz SyncMaster 21.95" scale=1 PPI=106x109 (physical) PPI=106x109 (logical), DPI=103.14
info: wayland.c:1275: HDMI-A-1: 1920x1080+0x0@60Hz ASUS VS228 21.68" scale=1 PPI=106x108 (physical) PPI=106x108 (logical), DPI=101.60
info: wayland.c:1428: requesting SSD decorations
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Regular.ttf: size=10.00pt/14px, dpi=103.14
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Italic.ttf: size=10.00pt/14px, dpi=103.14
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-BoldItalic.ttf: size=10.00pt/14px, dpi=103.14
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Bold.ttf: size=10.00pt/14px, dpi=103.14
info: terminal.c:694: cell width=8, height=19
info: terminal.c:583: using 2 rendering threads
info: wayland.c:805: using SSD decorations
info: fcft.c:758: /usr/share/fonts/OTF/PowerlineSymbols.otf: size=10.00pt/14px, dpi=103.14
info: wayland.c:1586: cursor theme: (null), size: 24, scale: 1
info: fcft.c:758: /usr/share/fonts/TTF/DejaVuSansMono.ttf: size=10.00pt/14px, dpi=103.14
- Wayland compositor: Sway 1.6.1
- Steps to reproduce:
echo 'متن راست به چپ'
I saw that foot uses fcft as a dependency which uses Harfbuzz for text shaping, so I thought text shaping for right to left languages would work, but I tried and it didn't.
Letters do not get combined, and direction of the text is RTL instead of LTR.
From the image in fcft's README, it seems fcft_text_run_rasterize() should at least shape it correctly(if not set its direction correctly). I did a quick search, it seems it's being used in render_osd.
RTL text(Persian(Arabic script)) in VTE based terminals:
RTL text in VTE based terminal
RTL text in foot:
RTL text in foot
- Foot Version:
foot version: 1.9.2-39-g6dfacb9c (Oct 20 2021, branch 'master') +pgo +ime +graphemes
- Log output:
```
info: main.c:402: version: 1.9.2-39-g6dfacb9c (Oct 20 2021, branch 'master') +pgo +ime +graphemes
info: main.c:409: arch: Linux x86_64/64-bit
info: main.c:416: locale: en_US.UTF-8
info: config.c:3064: loading configuration from /home/siavash/.config/foot/foot.ini
info: fcft.c:267: fcft: 2.4.5 +graphemes +runs
info: fcft.c:277: fontconfig: 2.13.94
info: fcft.c:283: freetype: 2.11.0
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Regular.ttf: size=8.00pt/8px, dpi=75.00
info: wayland.c:1275: DVI-I-1: 1920x1200+1920x0@60Hz SyncMaster 21.95" scale=1 PPI=106x109 (physical) PPI=106x109 (logical), DPI=103.14
info: wayland.c:1275: HDMI-A-1: 1920x1080+0x0@60Hz ASUS VS228 21.68" scale=1 PPI=106x108 (physical) PPI=106x108 (logical), DPI=101.60
info: wayland.c:1428: requesting SSD decorations
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Regular.ttf: size=10.00pt/14px, dpi=103.14
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Italic.ttf: size=10.00pt/14px, dpi=103.14
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-BoldItalic.ttf: size=10.00pt/14px, dpi=103.14
info: fcft.c:758: /usr/share/fonts/TTF/RobotoMono-Bold.ttf: size=10.00pt/14px, dpi=103.14
info: terminal.c:694: cell width=8, height=19
info: terminal.c:583: using 2 rendering threads
info: wayland.c:805: using SSD decorations
info: fcft.c:758: /usr/share/fonts/OTF/PowerlineSymbols.otf: size=10.00pt/14px, dpi=103.14
info: wayland.c:1586: cursor theme: (null), size: 24, scale: 1
info: fcft.c:758: /usr/share/fonts/TTF/DejaVuSansMono.ttf: size=10.00pt/14px, dpi=103.14
```
- Wayland compositor: Sway 1.6.1
- Steps to reproduce:
```console
echo 'متن راست به چپ'
```
I saw that foot uses fcft as a dependency which uses Harfbuzz for text shaping, so I thought text shaping for right to left languages would work, but I tried and it didn't.
Letters do not get combined, and direction of the text is RTL instead of LTR.
From the image in fcft's README, it seems `fcft_text_run_rasterize()` should at least shape it correctly(if not set its direction correctly). I did a quick search, it seems it's being used in [`render_osd`](https://codeberg.org/dnkl/foot/src/branch/master/render.c#L1604).
RTL text(Persian(Arabic script)) in VTE based terminals:

RTL text in foot:
