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:
- The characters are distorted, like it is not the same font (take a close look at the character ل)
- 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?