[NTG-context] lmtx & lohit-devanagari fonts

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Tue Apr 21 15:32:24 CEST 2020


Saša Janiška schrieb am 21.04.2020 um 15:06:
> Hello!
> 
> I'm working on a small presentation for an upcoming video meeting and started
> writing some points in Markdown. After using Pandoc to convert I noticed that
> *.pptx file does contain everything, but if I try with ConTexT, then Devanagi
> and some diacritics are missing.
> 
> By inspecting *.pdf file produced by: Pandoc --> PPTX --> LibreOffice --> PDF
> 
> I can see that Lohit-Devanagari font is used for Sanskrit and I have it
> installed on my Fedora (fc32) desktop machine.
> 
> Here is the test file:
> 
> \starttext
> ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते ।
> सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥
> 
> dhyāyato viṣayān puṁsaḥ
> saṅgas teṣūpajāyate
> saṅgāt sañjāyate kāmaḥ
> kāmāt krodho ’bhijāyate
> 
> Translation: ``While contemplating the objects of the senses, a person
> develops attachment for them, and from such attachment lust develops,
> and from lust anger arises.''
> 
> \stoptext
> 
> which I would like to quote - I am somewhat familiar with latin transliteration
> via diacritics, but completely ignorant in regard to Devanagari - but wonder
> what is required to make ConText (lmtx) typeset it?

You have to set a font which has the required glyphs but you can also 
use different fonts for both scripts and combine them.

\definefallbackfamily [mainface] [ss] [Noto Sans Devanagari]
   [range={devanagari,devanagariextended},
    features=devanagari-two]

\definefontfamily [mainface] [ss] [Noto Sans]

\setupbodyfont[mainface]

\starttext

ध्यायतो विषयान्पुंसः सङ्गस्तेषूपजायते ।
सङ्गात्सञ्जायते कामः कामात्क्रोधोऽभिजायते ॥ ६२ ॥

dhyāyato viṣayān puṁsaḥ
saṅgas teṣūpajāyate
saṅgāt sañjāyate kāmaḥ
kāmāt krodho ’bhijāyate

\stoptext

Wolfgang


More information about the ntg-context mailing list