0

My goal is to write small chuncks of Arabic/Hebrew text (words, paragraphs) within a Latin-alphabet language.

I've been trying to set an Arabic fallback font using various examples from here, but so far results have been subpar (even the parentheses do not work)enter image description here:

\definefallbackfamily [mainface] [serif] [Adobe Arabic] [range=arabic,feature=arabic]
\definefontfamily [mainface] [serif] [Minion Pro][features=oldstyle]
%\definefontfallback[mainface][sans][range=arabic]
\setupbodyfont[mainface]
\definefontfeature
   [arabic]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,isol=yes,
    liga=yes,dlig=yes,rlig=yes,clig=yes,
    mark=yes,mkmk=yes,kern=yes,curs=yes]

\define[1]\arabico{\definedfont[name:adobearabic*arabic]\setupalign[r2l]#1}

\starttext % load the font { \definedfont[name:adobearabic*arabic% at 36pt ] \setupalign[r2l]

ضَرَبَ ضُرِبَ ضَرْبًا( ) ضَرَبَ ضُرِبَ ضَرْبًا } % %\d{D}

Teste: %font loads, no right-to-left (ضَرَبَ ضُرِبَ ضَرْبًا) Teste {\definedfont[name:adobearabic*arabic]\setupalign[r2l]ضَرَبَ ضُرِبَ ضَرْبًا} %works, but parenthesis doesn't asdf (\arabico{ضَرَبَ ضُرِبَ ضَرْبًا})

\stoptext

F. Pantigny
  • 40,250
user574859
  • 867
  • 3
  • 11

1 Answers1

0

After days of trial and error, scurrying and browsing the manuals, the documentation, the wiki (whose typescript doesn't even work by default), and this site, I found out the solution myself:

\definefallbackfamily[myfamily][serif][Amiri][features=arabic,range=arabic] %range=arabic was luck by analogy
\definefontfamily [myfamily] [serif] [Minion Pro][features=oldstyle]
\definefontfamily [myfamily] [sans] [Myriad Pro][features=oldstyle] % ss = sans serif
\definefontfamily [myfamily] [mono] [Consolas] % tt = teletype
\definefontfamily   [myfamily] [math] [Cambria Math] % 
\setupbodyfont [myfamily,11pt] 
\setupbodyfont[myfamily]
\setupdirections[bidi=global] %not in wiki
\starttext
أهلاً وسهلاً

\language[fr] Asdf; 134890: a! \stoptext

user574859
  • 867
  • 3
  • 11