Localization/Arabic
This article describes how to set up Arabic language environment.
Applications
- Locale article explains how to set up system or user locale.
- Bidirectional text article lists Bidi support status in applications.
- Keyboard layout: set it by
setxkbmap ara,us
. Check the article for more info. - Ayaspell offers spellchecking extensions. Can be installed system-wide by hunspell-arAUR.
- Aspell: install aspell-arAUR
- Islamic tools: for Hijri date conversion.
- LibreOffice: set up Bidi support. If you're not using a system-wide Arabic dictionary, Ayaspell extension can be installed from Tools > Language > More Dictionaries Online > Arabic. For language pack, install libreoffice-still-ar for the stable branch and libreoffice-fresh-arabic[broken link: package not found] for Libreoffice fresh.
- Thunderbird: install thunderbird-i18n-ar for language pack.
- Firefox: install firefox-i18n-ar for language pack.
Shell
- bash and zsh use "combining characters" (1) feature to merge diacritics and characters in one character.
- zsh: to properly display diacritics add
setopt COMBINING_CHARS
to your.zshrc
.
Vim
- See Vim#Bidirectional support for setting up Bidi support.
- Since Vim doesn't map Arabic characters given by input method, motion commands don't work. A possible workaround is to set keymap within Vim without changing X11 keymap. This can be done
set keymap=arabic
, then switching between layouts viaCtrl-^
, or by manually set langmap invimrc
:
set langmap=ضصثقفغعهخحجد;qwertyuiop[],شسيبل;asdfg,اتنمكط;hjkl\;',ئءؤرلا;zxcvb,ىةوزظ;nm،./,لآB,آN,'M,؟?,ِA,ٍS,لأG,أH,ـJ,،K,ًW,ُE,ٌR,لإT,إY,÷I,×O,؛P
Fonts
Check Font configuration/Examples#Arabic for setting up font configuration. Persian fonts like vazirmatn-fontsAUR also include support for Arabic letters. A list of Persian fonts can be checked from Fonts#Persian.
Wide-character support:
- noto-fonts - Google Noto fonts. Or noto-fonts-arAUR for Arabic only.
- ttf-ibm-plex
- ttf-dejavu - Includes DejaVu Sans Mono, for monospace Arabic fonts.
- ttf-ubuntu-arabicAUR
Naskh (~Serif):
- ttf-scheherazade-new — Unicode Arabic font from SIL (Alternative for Traditional Arabic font)
- ttf-amiriAUR — A classical Arabic typeface in Naskh style pioneered by Amiria Press. Its Latin characters are based on Crimson (otf-crimson) [1] [2]
- ttf-qurancomplex-fontsAUR — Fonts by King Fahd Glorious Quran Printing Complex in al-Madinah al-Munawwarah
Ruqaa, Kufi (~Sans-Serif):
- ttf-aref-ruqaaAUR
- ttf-cairoAUR
- mada-fontAUR[broken link: package not found]
- ttf-reem-kufiAUR
- ttf-raqqAUR - A manuscript Kufic typeface.
Monospace:
- vazir-code-fontsAUR - Persian font with good monospace support for Arabic.
- otf-kawkab-monoAUR
Bitmap:
Misc:
- ttf-arabeyes-fontsAUR — Collection of free Arabic fonts
- ttf-markazi-text-variableAUR
- ttf-mada-variableAUR
- ttf-sil-lateefAUR — Unicode Arabic font from SIL
- ttf-rubikAUR
- ttf-tajawalAUR
Troubleshooting
Common issues may be solved by checking Locale#Troubleshooting first. For problems related to text direction, check Bidi.
XKB Lam Alif problem
X keyboard layout sends Arabic ligature glyphs as a single glyph. For example, Laa+Alif ligature "لا" (U+0644, U+0627) is sent as "ﻻ" (U+FEFB), and similarly for (ﻷ، ﻵ، ﻹ). This is due to a known limitation in xkb which does not allow mapping a key to more than one character.
To solve this problem, set up a supported input method then restart X server. The following are input methods confirmed to work.
- xim.
- IBus: supported since v1.5.28.
- ibus-typing-booster: supported since 2.19.0
To set up input method (E.g: xim), either use im-config -n xim
if you have it installed, or manually by adding the following to your environment variables:
XIM=none XIM_PROGRAM=/bin/true XIM_ARGS= GTK_IM_MODULE=xim QT_IM_MODULE=xim SHORT_DESC="X compose table"
However, since most QT-based programs do not have this issue, it is enough to add export GTK_IM_MODULE=xim
to ~/.xsessionrc
or ~/.xprofile
.
AltGr
key. The default compose table is located in /usr/share/X11/xkb/symbols/ara
.Fix Arabic legibility when using Noto Fonts
See Font configuration/Examples#Excluding Arabic script from other languages.