\setmainfont[Script=Devanagari]{Sanskrit 2003}

अ आ इ ई उ ऊ ऋ ए ऐ ओ औ अं अः  


If I compile above sample using xelatex in Texlive 2016, I get the following font warning messages

fontspec warning: "script-not-exist"

Font 'Sanskrit 2003' does not contain script 'Devanagari'.

What is the reason for this and how should I fix it? In Texlive 2014 I didn't have this problem.

  • I can compile your code without any errors/warnings. Are you sure you have properly installed the font? – Alenanno Aug 23 '16 at 11:48
  • Yes I have installed the font in /usr/share/fonts/truetype/ttf-indic-fonts-core/ – Shivashankar Aug 23 '16 at 12:26

I get the warning too. The problem is that Script=Devanagari is mapped to two open type script tags. In fontspec-xetex.sty you can find:


Sanskrit has the deva feature but not the dev2 feature and when it checks (first) for dev2 this triggers the warning. Imho the warning is confusing but harmless. You can avoid it by exchanging the order of the check by adding after fontspec:


But then you probably will get it again if you use a font with dev2 ;-(.

A better solution would be if fontspec would issue the warning only after it has processed the full list.

  • Why don't I get it then? Do I have a different version or something? I can't think of a reason to explain this. – Alenanno Aug 23 '16 at 12:33
  • @Alenanno: I don't know. Perhaps your font is different and has dev2, or your fontspec is older (in tl14 I don't get the warning either). – Ulrike Fischer Aug 23 '16 at 12:39
  • After inserting \newfontscript{Devanagari}{deva,dev2} it is working. I mean no more warnings. Thanks a lot – Shivashankar Aug 23 '16 at 14:22
  • @UlrikeFischer — looks like I need to correct that :) github.com/wspr/fontspec/issues/317 – Will Robertson Jan 30 '18 at 13:09
  • @UlrikeFischer — hmmm, did I fix this at some point? I can reproduce this now... – Will Robertson Jul 31 '18 at 11:07

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.