# Problem when trying to make arabic text follow the path using TikZ

I need to make Arabic text follow some curved path using TikZ. This is the sample code I am using:

\documentclass{book}
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\usepackage{fontspec}
\usepackage{polyglossia}

\setmainlanguage{english}
\setotherlanguage{arabic}

\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{GretaArabicAR-Regular}
\newfontfamily{\arr}[Script=Arabic,Scale=1.1]{GretaArabicAR-Regular}
\newfontfamily{\arb}[Script=Arabic,Scale=1.1]{GretaArabicAR-Bold}

\begin{document}

\begin{tikzpicture}
\draw[postaction={decorate,decoration={text along path,text align=center,
text={|\fontsize{20pt}{20}\selectfont\arb|إلى حبيبي لوكاس"!},
raise=-1pt}}](58mm, -64mm)to[bend left=35] (152mm, -36mm){};
\end{tikzpicture}

\textarabic{\arb\fontsize{20pt}{20}\selectfont{إلى حبيبي لوكاس"!}}

\end{document}


When I compile it, there are two problems:

1. The characters are distorted, like it is not the same font (take a close look at the character ل)
2. I cannot force RTL to the text itself. It just ignores me.

Here are the sample PDF i am getting and the font I'm trying to use: https://www.dropbox.com/sh/qx3yzfaavf8io9j/AACEdkMKQFaPr-oNj8BOQ2iXa?dl=0

Can someone shed some light on these issues I am experiencing?

• Greta is a commercial font and shouldn’t be made available on Dropbox — especially since the problem can be illustrated with Arabic fonts available to everyone in TeXLive. – Thérèse Oct 12 '17 at 16:37

The characters are not distorted, but they are just the isolated forms. Arabic can’t easily be typeset on a curved path because the characters won’t be attached properly to each other. It is possible, however, to align words to the path. See the following MWE (also see this question):

\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{decorations.text}

\usepackage{fontspec}
\usepackage{polyglossia}

\setmainlanguage{english}
\setotherlanguage{arabic}

\newfontfamily\arabicfont[Script=Arabic,Scale=1.1]{GretaArabicAR-Regular}
\newfontfamily{\arr}[Script=Arabic,Scale=1.1]{GretaArabicAR-Regular}
\newfontfamily{\arb}[Script=Arabic,Scale=1.1]{GretaArabicAR-Bold}

\begin{document}

\begin{tikzpicture}\arb\fontsize{20pt}{20}\selectfont
\draw[postaction={decorate,decoration={text along path,text align=center,text format delimiters={|}{|},text={|\textarabic|{لوكاس"!} |\textarabic|{حبيبي} |\textarabic|{إلى}},raise=-1pt}}](58mm, -64mm)to[bend left=35] (152mm, -36mm){};
\end{tikzpicture}

\textarabic{\arb\fontsize{20pt}{20}\selectfont{إلى حبيبي لوكاس"!}}

\end{document}


This yields (using Amiri instead of Greta):