Bidirectional text
From Wikipedia:Bidirectional text, is text that contains two text directionalities, right-to-left (RTL) and left-to-right (LTR).
Concepts
- Text direction
- in text editing, setting text direction changes how the program interacts with typed text including changes in text navigation, text selection, and text insertion.
- Text alignment
- text alignment only changes how text is displayed and styled.
- Fake Bidi
- a fake locale displaying completely reversed English sentences to mimic a RTL context. This helps developers who do not speak a RTL language to deal with RTL issues. For example:
This English sentence contains SDROW CIBARA EMOS and ends with English words.
- Poor man's bidi mode
- automatic visual text order right-to-left input in normal terminal.
- Logical navigation
- words are traversed as they are read.
- Visual navigation
- words are traversed as they are displayed. This GIF demonstrates the difference between the two.
Logical navigation is the correct way of navigation that programs should implement to fully support Bidi. Despite that, it would be preferable to have a switch between the two.
- Unicode support
- there are three main Unicode control characters: Wikipedia:RLM, Wikipedia:LRM, Wikipedia:ALM.
- Bidirectional Algorithm
- is the set of rules applied to display text in the correct order.
fribidi-gitAUR is an open source implementations of Bidi Algorithm. python-bidiAUR is a python library for related functions.
Support
In order for a program to fully support Bidi text, it must have:
- Letter rendering (RTL)
- able to correctly apply letter shaping and ligatures. See Complete Text Layout. This is often referred to shortly as RTL support.
- Switch text alignment (Bidi)
- E.g: Firefox
Ctrl+Shift+X
shortcut. - Logical navigation
- in a RTL text, with RTL text alignment, arrow keys should not cause reversed navigation.
Tag | App | Date | RTL | Bidi | Nav | Notes |
---|---|---|---|---|---|---|
browser | chromium | 2022-08-28 | Yes | No | Yes | Chromium is the engine of ElectronJS. Fixing this should resolve Electron Apps too. |
browser | firefox | 2022-09-01 | Yes | No | No | |
browser | qtwebbrowser | 2022-11-01 | Yes | No | ||
browser | webkit | 2022-11-01 | Yes | No | ||
editor | AbiWord | 2007-12-06 | Yes | |||
editor | emacs | 2019-06-31 | Yes | With extension | ||
editor | kate | 2016-06-20 | Yes | |||
editor | LibreOffice | Yes | Yes | Yes | fully supported. Enabled using Complex Text Layout from settings. | |
editor | neovim | 2014-04-17 | No | see :set arabic | ||
editor | 2009-03-01 | Yes | ||||
editor | vim | 2015-08-19 | see :set arabic | |||
other | groff | 2005-12-02 | ||||
other | html | Yes | Yes | Yes | ||
other | latex | Yes | Yes | Using LuaTeX or XeLaTeX with polyglossia | ||
other | wine | 2002-04-21 | Yes | |||
terminal | alacritty | 2017-07-15 | ||||
terminal | dvtm | 2019-10-12 | ||||
terminal | gedit | Yes | For Gedit <= 2.1, workaround by extension. | |||
terminal | irssi | 2019-10-12 | ||||
terminal | kitty | 2019-11-01 | ||||
terminal | konsole | Yes | ||||
terminal | libvte | Yes | including libvte-based like Gnome, sakura, xfce4... | |||
terminal | Yes | |||||
terminal | 2019-07-04 | |||||
terminal | pymux | 2019-10-12 | ||||
terminal | qterminal | Yes | No | |||
terminal | 2015-02-03 | |||||
terminal | tmux | 2019-10-12 | won't fix | |||
terminal | wezterm | 2021-05-11 | ||||
terminal | xst | 2018-10-26 |
Troubleshooting
Verify UTF-8 Encoding is properly configured first. Make sure you install the fonts corresponding to your language: Arabic, Persian, Hebrew. For some terminal, (bicon-gitAUR) is required to properly display Arabic and Hebrew text.
gollark: Lisp-based commands!
gollark: Better idea: PARSER COMBINATORS!
gollark: PotatOS's code is actually much nicer, on the whole.
gollark: Why did you do it this way? *Deliberate* insanity?
gollark: I assumed it was by letter, hm.
See also
Internal links
This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.