2

I'm trying to find all the different font options available in the package devanagari for typesetting hindi. I found a template online, whose reduced working form is

\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hindi}
\newfontfamily\devanagarifont[Script=Devanagari]{mangal.ttf}

\begin{document}
Testing
\foreignlanguage{hindi}{बन्देश}
\end{document}

It seems to me that the font used is 'mangal.ttf' but how do I go about finding all the other font options available to me. I found the devanagari package on CTAN (link here http://www.ctan.org/pkg/devanagari) but I'm not sure how I can find a page with all the font options. I guess my question is how do I find the page that lists all the font options including 'mangal.ttf' and how they look?

6
  • You need a font viewer to find out which capabilities are built into an Opentype font such as mangal. One such program is FontForge, which is available for several computing platforms.
    – Mico
    Nov 16, 2014 at 23:05
  • @Mico Not necessarily. otfinfo is not a viewer, but it can tell you the features, supported scripts, available glyphs, font tables etc.
    – cfr
    Nov 16, 2014 at 23:33
  • In your document, you are not using the devanagari package, are you? I think that what you want to know is which fonts, of those installed on your system, support Devanagari script? But I'm not sure if I've understood correctly: could you clarify your question?
    – cfr
    Nov 16, 2014 at 23:35
  • @cfr I must admit that I'm not sure if I'm using the davanagari package. When I ran the code it installed many packages and I assumed one of them must have been {devanagari} Nov 17, 2014 at 0:19
  • @cfr yes. I would like to obtain a list of the possible font types I can use with the devanagari script Nov 17, 2014 at 0:20

1 Answer 1

3

To find out if a particular font supports a particular script, you can use otfinfo:

otfinfo -s NotoSans-Regular.ttf 
cyrl            Cyrillic
grek            Greek
latn            Latin

To find out which fonts on your system support a particular language, you need to use some font management tool. Since you are using XeTeX/LuaTeX, you are able to use fonts installed for your system rather than just being restricted to TeX fonts. This is great as it improves support for non-Latin scripts dramatically. But it means that finding out what you have requires working with the tools available on your system.

On a GNU/Linux machine, for example, I can use fc-list to find fonts which support Hindi:

fc-list :lang=hi

But obviously this is dependent on your OS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .