4

I am trying to work with Arabic and English texts in the same buffer. They don't have to be in the same paragraphs.

A text like والإكرام و نوافج is shown as separate letters.

Contrary to English, in Arabic, the letters should change the form depending on their position (beginning, middle or end). I see the individual: و ا ل إ ك رام و ن وا ف ج.

Emacs recognizes that the Arabic text is left-to-right though. The backspace key deletes the last logical letter, that is,the letter to the right of the cursor.

  • What Emacs version are you using, and what font are you using? Does it happen when you start up Emacs without your init file (from the command line: emacs -Q)? – Dan Oct 7 '15 at 14:12
  • @Dan: Emacs 24.3, Courier monospace font, it happens without the .emacs too. – P. Ajrem Oct 7 '15 at 17:12
  • @Dan: if it helps, gedit has no problem connecting the letters, and it's using the fixed width Ubuntu mono font. – P. Ajrem Oct 7 '15 at 17:26
  • Dejavu sans mono (Linux) on monoco (OS X) both do Arabic correctly for me. – Dan Oct 8 '15 at 21:06
  • Can enabling or disabling auto-composition-modehelp? – Name Oct 9 '15 at 12:02
5

I found a solution.

1st run (print (font-family-list)) and get a full list of all fonts. Pick an installed Arabic font. In my case it was "clearlyu arabic".

Add this line to the .emacs file:

(when window-system (set-fontset-font "fontset-default" '(#x600 . #x6ff) "clearlyu arabic"))

Change the font name at the end to the name of the font you have installed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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