8

I figured out how to write with Arabic fonts

\documentclass[a4paper,11pt]{article}

\usepackage{arabluatex} % for support of arabic fonts
\newfontfamily\arabicfont{Amiri}[Script=Arabic, RawFeature={+anum}]
\begin{document}
    My arabic test
    \arb{تحميل كيبورد عربي للكمبيوتر}
\end{document}

According to the documentation of arabluatex it only support arabic fonts. In chapter 1.1. it refers to arabtex and arabxetex for writing in Urdu or Pashto. Since I'm using lualatex I have some troubles. I didn't find proper samples how typeset with these fonts.

I do NOT need to have a transcript latin letter into the lang - preferably I need to switch it off. I only (?) need to display the input with the proper fonts - and most preferable with the proper typesettings. Is there a sample in which Arabic, Urdu, Pashto or/and Dairi are mixed together and are compilable with lualatex (1.10)

3
  • 2
    I have no idea what is the difference between the scripts, but probably you should switch to texlive 2020 so that you can use the new lualatex based on luahbtex 1.12 and so use the harfbuzz renderer. Apr 2, 2020 at 8:17
  • About the switching to luatex1.12 I am heavily confused. On the offical luatex web site I find for download for Linux only a release from 2019. On Wikipedia I see there should be a stale release from March15th, 2020. But don't know from where to take it. And even if I would use 1.12 I'm still highly unclear how to use it. Do I still need the arabluatex or is it not any longer required?
    – LeO
    Apr 2, 2020 at 8:48
  • 1
    luahbtex1.12 is part of texlive 2020 which will be released soon and can be pretested here tug.org/texlive/pretest.html. But actually I wrote nonsense: you can try harfbuzz mode in texlive 2019 by using lualatex-dev instead of lualatex. see e.g. tex.stackexchange.com/a/520183/2388 Apr 2, 2020 at 8:52

1 Answer 1

10

This here should probably work (to really make use of the HarfBuzz Render you need either texlive 2020 or should use the lualatex-dev format):

\documentclass{article}
\usepackage{fontspec}
\usepackage[bidi=basic]{babel}
\babelprovide[import=ur,mapdigits]{urdu}
\babelfont[urdu]{rm}[Renderer=HarfBuzz]{Amiri}


\begin{document}
My urdu test

\selectlanguage{urdu}

    یہ ایک جملہ ہے

\end{document}

enter image description here

3
  • Sounds great. Which means that I just need to set before the Urdu, Pashto or Arabic the specific language - so the lualatex uses the proper font, right? BTW: What means mapdigits since I didn't find it in the babel docu 3.29?
    – LeO
    Apr 2, 2020 at 11:00
  • 1
    mapdigits in new in version 3.30 and it map numbers to the numbers of the script (but I have no idea if this is sensible here as I don't know the script. I copied this from another answer) Apr 2, 2020 at 12:50
  • A followup to this answer could be found in tex.stackexchange.com/q/572932/48642
    – LeO
    Nov 30, 2020 at 8:42

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.