Last updated: 1 year
I’ve been using Linux for more than twenty-five years, so my software environment is completely open source. For writing, I use LibreOffice instead of Microsoft Word. At first, it was quite difficult to write Arabic texts in LibreOffice. At the end of 2016, however, LibreOffice expanded language support. LibreOffice provides support for both Complex Text Layout (CTL) and Right to Left (RTL) layout languages (such as Urdu, Hebrew, and Arabic).
Today, I no longer have any difficulties when I switch between Arabic and English and German. For most of the time, I use templates. However, if you do not work with format templates and change fonts manually, you will have to contend with a strange and annoying behavior of LibreOffice.
A developer from Kuwait (Mejlad Alsubaie) wrote an extension that fixes this:
Font Name Fix (إصلاح اسم الخط أثناء الكتابة في ليبروفس)
It fixes the name of the font while writing if the system language is different from the writing language.
Many may not even be aware of the problem. You take LibreOffice’s behavior for granted and just do a few more extra clicks to fix it manually. But once you understand where the problem lies, the extension makes life a little easier. So, let’s see what the problem is about.
The problem when switching languages in LibreOffice
If you switch to Arabic and then select a font for Arabic from the font dropdown, LibreOffice always switches back to the default font. Why is that? It is related to the settings.
In the settings of LibreOffice Writer, you can define the standard font for Western languages.
For languages such as Arabic, you can also set a default font. This can be set under the CTL options (complex text layout):
Once we set all this in the settings, everything works fine as long as we don’t change the font for Arabic.
Video illustrating the problem in LibreOffice when switching to Arabic
So far, so good. But what would happen if we change the font for the Arabic writing? As above, assuming that we have set Amiri as the default Arabic (CTL) font, LibreOffice will automatically switch back to Amiri. The following video shows this somewhat annoying behavior of LibreOffice:
So, you would have to mark the Arabic word again, select the font – so that the font is also adopted. However, as soon as you insert a paragraph, LibreOffice will switch back to the default font.
Why is that? In our example, the system/interface language is English. If we switch the interface to Arabic, the problem is gone – but only for Arabic. So, it always depends on the local language. As Mejlad Alsubaie, a developer from Kuwait, explained to me, the problem is that LibreOffice always uses the default settings that you set up in the preferences.
Let’s test it: I use Linux. If you have installed the LibreOffice Arabic language pack, just open the terminal, and you can easily start LibreOffice with the Arabic interface by using the following command:
$ LANG=ar_EG.UTF-8 libreoffice --writer
If we look at the settings now, the complex fonts (النصوص المركّبة) still have the same values. In our example, using the Amiri font for CTL (right-to-left text).
Video showing the expected behavior in LibreOffice when changing fonts
Now comes the interesting part: When we use Arabic as the interface and write in Arabic, everything is as expected. We choose a different font from the panel and start to write in Arabic. When we insert a paragraph, the font we just selected is retained and does not switch to the default font.
So, that’s precisely what we need in the English interface as well.
The solution: the Extension Font Name Fix
Mejlad Alsubaie, a developer from Kuwait who is the author of Mishkallo, has developed an extension that solves the problem. It can be downloaded for free and installed easily and quickly. It works on all operating systems (Windows, Mac, Linux).
Once you have installed the extension and restarted LibreOffice, you can also conveniently and quickly turn the extension on and off from the LibreOffice menu:
Extras -> Plugins -> Font Name Fix
If you know any other useful app, tool or extension, please let me know.
Hi, thank you for all your support. I want to ask if the program support the Arabic user interface
I am not sure. It is best if you contact the author of the extension directly.
I know we are a minority. But some of us Linux Nerds would like to hear more about how Arabic for Nerds manages his workflow and what programs you use. I see Donovan Nagel from Mezzoguild is also a Linux user.
Hi Paul, I am happy to do that. However, I’m not sure if I can really share much that’s new. Do you mean especially what tools I use for Arabic? Or just in general?