[XeTeX] what is \setmainfont used for?

Philip Taylor P.Taylor at Rhul.Ac.Uk
Fri Feb 10 00:07:36 CET 2017

François Patte wrote:
> if I compile this:
> <----------------------------------
> \documentclass[a4paper,twoside,11pt]{book}
> \usepackage{fontspec}
> \usepackage{polyglossia}
> \setdefaultlanguage{sanskrit}
> \newfontfamily{\devanagarifont}{FreeSerif}%
> [Mapping=velthuis-sanskrit,Script=Devanagari]
> \begin{document}
> ekaadaya.h eka uttaro v.rddhirye.saa.m te ekottaraa.h
> ekaadaya"scaikottaraa"sca te tathaa eva.mvidhaa vyastaa.h
> apasavyakramasthaapitaa.h a"nkaa.h kramasthitai.h
> \end{document}
> <--------------------------------
> I get a correct output in devanagari script...
You have declared a new font family, but as far as I can see, you make no subsequent use of that declaration, François.
Of course, I know nothing about either LaTeX or fontspec (or polyglossia, for that matter) but that is how it appears to me.

Philip Taylor

More information about the XeTeX mailing list