8

@khaledhosny has made a great font bundle called Amiri. One of them is Amiri Quran Colored which has colored diacritics. I wanted to use them with xelatex but it didn't work! Is there any TeX-based engine capable of rendering this type of font?

\documentclass{article}

\usepackage{xepersian}
\settextfont{Amiri Quran Colored}

\begin{document}
سلامٌ علَیکم وَ رَحمةُ الله و بَرَکاتُهُ
\end{document}
8

It works in LuaLaTeX, you just have to enable the colr feature:

\documentclass{article}

\usepackage{fontspec}
\setmainfont[RawFeature=colr,Script=Arabic]{Amiri Quran Colored}

\begin{document}
\pardir TRT\textdir TRT % enable right to left typesetting
سلامٌ علَیکم وَ رَحمةُ الله و بَرَکاتُهُ
\end{document}

enter image description here

The two boxes indicate that two glyphs don't exists in the font. I can't tell you anything about that because I don't anything about Arabic.

  • 2
    The O.P. used U+06A9 instead of U+0643. Paste this into your example and the boxes will go away: سلامٌ علَیكم وَ رَحمةُ الله و بَرَكاتُهُ – Thérèse Dec 12 '19 at 14:08
  • @Thérèse Do you know why the font uses the U+06A9 instead of U+0643? – javadr Dec 12 '19 at 16:13
  • 2
    @javadr It seems to be designed only for Quranic Arabic, not for the needs of Persian. – Thérèse Dec 12 '19 at 16:17
12

In the luaotfload test suite we have the (slightly adapted) test file. The compilation need the luahbtex engine which you can use in a current tex system by using the lualatex-dev format. Disclaimer: I don't know arabic and have no idea what the text means.

\documentclass{article}
\usepackage{setspace}
\usepackage{fontspec}
\usepackage[bidi=basic]{babel}
\babelprovide[import, main]{arabic}
\setmainfont{amiri-quran-colored.ttf}[Script=Arabic,Renderer=Harfbuzz]
\begin{document}
\setstretch{3.8}
\parindent=0pt
\leftskip=0pt plus 1fil
\rightskip=0pt plus -1fil
\parfillskip=0pt plus 2fil
\def\aya#1{{\textdir TLT ^^^^06dd#1}}
^^^^fdfd~\aya{١}\par
ٱلۡحَمۡدُ لِلَّهِ رَبِّ ٱلۡعَٰلَمِینَ~\aya{٢} ٱلرَّحۡمَٰنِ ٱلرَّحِیمِ~\aya{٣} مَٰلِكِ یَوۡمِ ٱلدِّینِ~\aya{٤} إِیَّاكَ نَعۡبُدُ وَإِیَّاكَ نَسۡتَعِینُ~\aya{٥} ٱهۡدِنَا ٱلصِّرَٰطَ ٱلۡمُسۡتَقِیمَ~\aya{٦} صِرَٰطَ ٱلَّذِینَ أَنۡعَمۡتَ عَلَیۡهِمۡ غَیۡرِ ٱلۡمَغۡضُوبِ عَلَیۡهِمۡ وَلَا ٱلضَّاۤلِّینَ~\aya{٧}\par


\end{document}

enter image description here

  • 1
    We should probably make this more consistent: Either colr should be enabled by default or disabled by default. Currently it depends on the mode... – Marcel Krüger Dec 12 '19 at 13:50
  • 1
    @MarcelKrüger I was already wondering why it is only colored in harf mode ;-) We should perhaps discuss with Will if he wants to add a fontspec option. – Ulrike Fischer Dec 12 '19 at 13:56
  • @UlrikeFischer Thanks. The text you've used in the MWE is the first chapter (Surah) of the Holy Quran. The translation is here: Im Namen Allahs, des Allerbarmers, des Barmherzigen! (1) Alles Lob gebührt Allah, dem Herrn der Welten (2) dem Allerbarmer, dem armherzigen (3) dem Herrscher am Tage des Gerichts! (4) Dir (allein) dienen wir, und Dich (allein) bitten wir um Hilfe. (5) Führe uns den geraden Weg (6) den Weg derer, denen Du Gnade erwiesen hast, nicht (den Weg) derer, die(Deinen) Zorn erregt haben, und nicht (den Weg) der Irregehenden. (7) – javadr Dec 12 '19 at 16:11

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.