0

I have this example of writing arabic with tfm font which work fine with pdflatex, the font is provided from arabi package.

https://ctan.org/tex-archive/language/arabic/arabi

\documentclass{article}
%\usepackage{fontspec}
\usepackage[utf8]{inputenc}
\usepackage[LAE]{fontenc}

\TeXXeTstate=1 % to anable right to left writing 

\begin{document}

\fontencoding{LAE}\fontfamily{aealyermook} \selectfont 

\beginR
نص عربي
123 

\end{document}

My hope is writing with this font in xelatex and lualatex

  • 7
    Imho not easy. The font probably works through ligatures of the 8-bit components. Unless you have a very pressing need I would suggest to drop the idea. Btw: I think that it doesn't work correctly with pdflatex in texlive 2018 due to the active inputenc. – Ulrike Fischer Jul 7 '18 at 8:36
  • I searched this site but I can't find a convincing method for using traditional tfm font with specific encoding in xelatex – Salim Bou Jul 7 '18 at 14:54
  • What is the font in question? Is it only available in this format? – gnucchi Jul 7 '18 at 14:57
  • Its an arabic font from arabi package ctan.org/tex-archive/language/arabic/arabi/arabi/texmf/fonts – Salim Bou Jul 7 '18 at 15:02
  • why should a "convincing method" (what probably means an easy method) exists to use with an unicode engine a font with an quite specific encoding geared toward an 8-bit engine like pdflatex? If you really want it: use fontforge to create a suitable otf from the pfb's. Expect that it will take many hours. – Ulrike Fischer Jul 7 '18 at 15:20
3

In this case, there’s no need to struggle with older encodings, because you can get a .ttf version of ae_AlYermook from the Debian package fonts-arabeyes, and the .sfd FontForge source from GitLab.

\documentclass{article}
\usepackage[novoc]{arabluatex}
\newfontfamily\arabicfont[Script=Arabic]{AlYarmook}
\begin{document}
\txarb{الأول: في الدلالة على وجود للمبدأ الأول}
\end{document}

output

Since this is a unicode version of the font, tools such as pdftotext extract the correct text from the PDF.

It is indeed possible to use older fonts and encodings in documents to be compiled with xetex or luatex. But the results become less satisfactory, and the text’s accessibility worse, the more complex the script. For example, you’re unlikely to notice problems if you set a word or two in uncials from the bookhands package. However, Arabic script is many times more complex than uncials.

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.