Jürgen Hanneder via ntg-context schrieb am 10.08.2024 um 11:10:
Dear Richard,
Are you after a Context version of something such as Xetex Devanagari?
Indeed. In my XeTeX publications settling the font was quite straightforward:
\usepackage{polyglossia,fontspec,xunicode} \setmainfont{Adobe Text Pro} \newfontfamily\sanskritfont[Script=Devanagari,Mapping=RomDev,Scale=1.4]{AdishilaSan}
\setdefaultlanguage{english} \setotherlanguage{sanskrit}
But coming back to ConTeXt:
I am grateful to Pablo and Wolfgang for their suggestions, but it does not (yet) work as it should. Perhaps this has to do with the problem in the language command. Here is my test file that works up to the point, and then shows the problem.
----------- \setuppapersize[A4] \setuplayout[width=14cm, height=fit]
\definefontfamily [roman] [rm] [minion]
You set a font here for english text but never enable it.
\definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \setupbodyfont [nagari]
This is where you set the font for the whole document.
\usetransliteration[indic] \definetransliteration [MyDeva] [lang=sa,vector={iast to deva}]
\startsetups [sanskrit] \settransliteration[MyDeva] \switchtobodyfont[nagari] \stopsetups
\setuplanguage [sa] [setups=sanskrit]
\starttext
Example: आनन्द। अपिच % this comes out as it should, but since input is in Nagari there is no transliteration involved. test % the word "test" comes out in roman, i.e. switching back to roman works.
\language[sa]{yoga} % the word "yoga" is typeset in Nagari as expected, test % but the word "test" is still typeset in Nagari
\language[en]{test} % still no switching back to roman, it seems stuck with Nagari.
\stoptext -----
\definefallbackfamily [Roman] [rm] [Adishila] [range=devanagari,features=devanagari-one] \definefontfamily [Roman] [rm] [Minion Pro] \setupbodyfont [Roman] \definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \usetransliteration[indic] \definetransliteration [MyDeva] [lang=sa,vector={iast to deva}] \startsetups [sanskrit] \settransliteration[MyDeva] \switchtobodyfont[nagari] \stopsetups \setuplanguage [sa] [setups=sanskrit] \starttext Example: आनन्द। अपिच Example: \language[sa]{yoga} \stoptext Wolfgang