How can I set the font name and size for Arabic letters in both emacs and xterm? Thanks

  • 1
    What have you attempted?
    – user12563
    Nov 12, 2018 at 21:52

1 Answer 1


The following will set the default fonts in your GUI Emacs and XTerm to "DejaVu Sans Mono" which is fairly common and has nice looking Latin and Arabic glyphs.

For your XTerm, and using uxterm a wrapper around xterm, add the following to the end of your ~/.Xresources:

UXTerm*faceName: xft:DejaVu Sans Mono:size=10

Then run xrdb -merge ~/.Xresources. This will take the changes you just made to your ~/.Xresources file and apply them to your current session. Subsequent uxterms you start will use these changes.

For Emacs edit your ~/.emacs.d/init.el and add:

 (set-default-font "DejaVu Sans Mono:size=10") 

Restart Emacs for this to take effect.

Obviously replace my example font with something you like. My example considers using only one font, but both font systems have a “fall through” system where you can use different fonts for different languages. Read up on XTerm’s and Emacs docs for specifics about that.

  • I have xterm; so I used XTerm.vt100.faceName: DejaVu Sans Mono:size=10:antialias=false along with (set-default-font "DejaVu Sans Mono") . It works fine, except that the Arabic letters in the terminal are reversed (LTR). Should I use UXterm? I did not find it for Archlinux, which is my distro. Nov 13, 2018 at 4:38
  • I found uxterm on my system; I used your settings. Same problem (LTR letters) exist. Nov 13, 2018 at 5:42
  • I don't think there's any RTL or bidirectional support in standard (unicode) xterm. For urxvt there's a plugin-in. I've never used it, but mlterm is supposed to have the best RTL/bidirectional support in a terminal emulator. Every modern Linux distro should package it, including Arch via the AUR.
    – nega
    Nov 13, 2018 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.