2

I would like to typeset a line of Arabic using ConTeXt and the Husayni font. I can see the lfg files located here:

  1. /usr/share/texmf/tex/context/fonts/husayni.lfg
  2. /usr/local/context/tex/texmf-context/tex/context/fonts/mkiv/husayni.lfg

However, nothing I try can actually get a simple document rendering properly (although I was able to get the same line of Arabic rendering with ConTeXt and the Amiri font). After Googling around a bit, the issue may lie in a file husayni.ttf, which is referenced in some presentations and source code files, but which isn't found on my system.

Was this file never released? Is the font not meant to be used, or have I made a mistake in my setup?

1
  1. First of all, you have to survey which font you can use to do your work. Then, here are some commands which works fine in ConTeXt Standalone :
  2. Therefore, you may look for your arabic fonts on your system; in order to do so open a terminal (cmd on Windows, xterm on Linux or Mac OS X), and type : cd /context/tex/texmmf-win64/bin [or the repertory where executable mtxrun is located inside your ConTeXt suite];
  3. Reload the fonts database : mtxrun --script fonts --reload
  4. List all the fonts : mtxrun --script fonts --list --all.
  5. Search a peculiar arabic font (here the husayni.ttf) : mtxrun --script fonts --list --pattern=husay* --all (note that you may search another font using some code as --pattern=*font*).
  6. Now, if your goal is to write your text in another language than arabic (say : english) where there are some arabic sentences, the best choice is to use some preamble in ConTeXt, where you set the mainlanguage and use the \definefallbackfamily command and the \definefontfamily command. But, precisely to do so, first you have to be sure that the font you want to use is able to print correctly arabic.
  7. If there is not arabic font on your system, download and install it (c:\windows\fonts; with Linux: ~.fonts/Library) from here : https://fontlibrary.org/fr/font/hussaini-nastaleeq
  8. Don't forget to reload fonts database with the 'mtxrun' command.

And try this code :

\definefallbackfamily [mainface] [sans] [hussaini-nastaleeq] [range=arabic]
\definefontfamily [mainface] [serif] [GFS Didot]
\setupbodyfont[mainface]
\setuplanguage[en][patterns={en}]
\startext

مرحبا يا عالم (Marhaba Ya Alam)
\stoptext
  • Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). – Seamus May 27 '16 at 10:35
  • My question was specifically about using ConTeXt in conjunction with the Husayni font that I referenced in my question (I observed, for instance, that typesetting with ConTeXt and the Amiri Arabic font works without a problem). It is distinct from the Hussaini font that you reference (although named very similarly, which is confusing, I know). – A. Ahmad May 28 '16 at 17:11
  • Would you please write clearly what is the problem ? I notice you have written that "you have been able to get the same line of Arabic rendering with ConTeXt and the Amiri font", but what is clearly and precisely the problem with husayni.ttf font ? – Adeimantos May 31 '16 at 6:21
  • @Adeimantos The problem is that I cannot find the husayni.ttf font anywhere. It is not on my Ubuntu system, it was not installed when I installed ConTeXt, and I can't figure out where to download it from the internet. Yet, if you see the links I included in my original post, Professor Idris Samawi Hamid has been publishing papers about typesetting results he obtained with that font, between the years of 2009-2012. – A. Ahmad May 31 '16 at 15:40
  • @Ahmad. The husayni.ttf seems to be load with a ConTeXt module. You may find some help looking the 'type-imp-husayni.mkiv' file within ConTeXt Standalone.(here : context/tex/texmf-context/tex/context/fonts/mkiv). – Adeimantos Jun 2 '16 at 6:25

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.