[XeTeX] selecting feature in Devanagari MT with fontspec

Will Robertson will at guerilla.net.au
Mon Aug 8 09:57:06 CEST 2005


Yves wrote:
> I had a closer look at the output. With the following commands:
>
> (1)
> \setromanfont{Lucida Grande}
> \newfontinstance\devanagarifont[Script=Devanagari]{Sanskrit 2003}
> \newcommand{\dev}[1]{\language=\sanskrit\devanagarifont #1}
>
> (2)
> \setromanfont{Lucida Grande}
> \newfontinstance\devanagarifont[Ligatures=Rare,BoldFont={Devanagari  
> MT Bold},ItalicFont={Devanagari MT Bold },BoldItalic={Devanagari MT  
> Bold}]{Devanagari MT}
> \newcommand{\dev}[1]{\language=\sanskrit\devanagarifont #1}
>
> XeTeX doesn't use the font called by \setromanfont when a \dev  
> environment is closed, except for titles. In case (1) the Latin  
> text appears but it uses Sanskrit 2003. And in case (2) it doesn't  
> appear, since Devanagari MT has no Latin letters.
>
> Is there anything wrong with these commands?

It concerns me a little about the Devanagari font not working  
properly, but I'll check that out when I have time.

But I'm confused about what you're trying to do with your \dev commands.
Are you trying to write "\dev{some Latin text}" and have the output  
come out in Lucida Grande? If so, that's (kind of) impossible, and  
you'd need to create your own font that contains both Sanskrit and  
Lucida letters at the appropriate glyph locations. Otherwise, you  
need to explicitly mark up which parts of your text is to use Latin  
letters, and which parts use Sanskrit letters.

Good luck,

Will



More information about the XeTeX mailing list