<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">I use Polyglossia with a modified version of ucharclasses to automatically switch font based on script. The preamble has the following :</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><div class="gmail_default">% mainfont, englishfont, sanskritfont, romanfont, devanagarifont, englishfont, vedafont</div><div class="gmail_default">\defaultfontfeatures{Mapping=tex-text}</div><div class="gmail_default">%Polyglossia </div><div class="gmail_default">%Script (default = Devanagari) passed to Fontspec for Sanskrit language if \devanagarifont or \sanskritfont not defined</div><div class="gmail_default">\defaultfontfeatures{Mapping=tex-text}</div><div class="gmail_default">\setmainlanguage{english}</div><div class="gmail_default">\setotherlanguage{sanskrit}</div><div class="gmail_default">%</div><div class="gmail_default">%Fontspec</div><div class="gmail_default">\setmainfont[Color=teal]{FreeSerif}</div><div class="gmail_default">\setmonofont[Path=/home/shree/sanskritdocuments-git/fonts/,Scale=0.7]{mplus-1m-regular.ttf}</div><div class="gmail_default">%</div><div class="gmail_default">\newfontfamily{\englishfont}{FreeSerif}</div><div class="gmail_default">%</div><div class="gmail_default">\newfontfamily{\devanagarifont}[Scale=1]{Lohit Devanagari}</div><div class="gmail_default">\newfontfamily{\tamilfont}[Script=Tamil,Scale=0.9]{Lohit Tamil Classical}</div><div class="gmail_default">\newfontfamily{\telugufont}[Path=/home/shree/sanskritdocuments-git/fonts/,Script=Telugu,Scale=1.1]{Pothana2000Vedic_1_2_1.ttf}</div><div class="gmail_default">\newfontfamily{\gujaratifont}[Path=/home/shree/sanskritdocuments-git/fonts/,Scale=1,Script=Gujarati]{Rasa-Regular.ttf}</div><div class="gmail_default">\newfontfamily{\vedafont}[Scale=1.2,Color=purple]{Siddhanta}</div><div class="gmail_default">\newfontfamily{\vedablackfont}[Scale=1.1]{Siddhanta}</div><div class="gmail_default">%</div><div class="gmail_default">\usepackage[Latin, GeneralPunctuation, DevanagariMarks, DevanagariPreMarks, DevanagariExtended, DevanagariPostMarks, Gujarati, Tamil, Telugu, VedicExtensions, SuperscriptsAndSubscripts]{ucharclasses}</div><div class="gmail_default">\setTransitionsForLatin{\englishfont}{}</div><div class="gmail_default">\setTransitionTo{GeneralPunctuation}{\englishfont}</div><div class="gmail_default">\setTransitionTo{SuperscriptsAndSubscripts}{\englishfont}</div><div class="gmail_default">\setTransitionTo{DevanagariPreMarks}{\devanagarifont}</div><div class="gmail_default">\setTransitionTo{DevanagariPostMarks}{\devanagarifont}</div><div class="gmail_default">\setTransitionTo{DevanagariMarks}{\vedafont}</div><div class="gmail_default">\setTransitionTo{DevanagariExtended}{\vedablackfont}</div><div class="gmail_default">\setTransitionTo{VedicExtensions}{\vedafont}</div><div class="gmail_default">\setTransitionTo{Gujarati}{\gujaratifont}</div><div class="gmail_default">\setTransitionTo{Tamil}{\tamilfont}</div><div class="gmail_default">\setTransitionTo{Telugu}{\telugufont}</div><div class="gmail_default">%</div><div class="gmail_default">\setTransitionsFor{Latin}</div><div class="gmail_default">  {\hyphenrules{english}\englishfont}</div><div class="gmail_default">  {\hyphenrules{sanskrit}\devanagarifont}</div><div class="gmail_default">\setTransitionsFor{Devanagari}</div><div class="gmail_default">  {\hyphenrules{sanskrit}\devanagarifont}</div><div class="gmail_default">  {\hyphenrules{english}\englishfont}</div><div class="gmail_default">%</div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">ShreeDevi<br>____________________________________________________________<br>भजन - कीर्तन - आरती @ <a href="http://bhajans.ramparivar.com" target="_blank">http://bhajans.ramparivar.com</a><br></div></div></div>
<br><div class="gmail_quote">On Sat, Feb 11, 2017 at 3:11 AM, Dominik Wujastyk <span dir="ltr"><<a href="mailto:wujastyk@gmail.com" target="_blank">wujastyk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">This discussion reminds me of a long-standing question in my mind.  hyph-sa.tex contains hyphenation rules for Sanskrit in several different scripts, including Latin script.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">The Polyglossia file gloss-sanskrit.ldf contains codes for invoking many of the scripts in which the Sanskrit language is written, such as Devanagari, Gujarati, Malayalam and so on.  But there isn't a rule for saying, for Sanskrit, [Script=Latin].  </div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">How would this be done?  I've been looking at commands like \xpg@fontsetup@latin, but it's quite hard (for me) to see what's going on.  (I should get the doc file.)  </div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Has someone already solved or addressed this, or am I wrong about it in some way?</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">The idea would be to be able to say </div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">\setmainfont{FreeSans}[Script=<wbr>Latin]</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">\newfontfamily\sanskGujarati{<wbr>Code2000}[Script=Gujarati]</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">etc. </div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Actually, the more I play with this, the less I understand what's going on.  I thought I had Polyglossia nailed, but I don't.   Why doesn't \sanskGujarati set my text in Gujarati script?</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Dominik</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small"><br></div><div class="gmail_extra"><div><div class="m_4019382697735664208gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span><div dir="ltr"><div><span><div dir="ltr"><div style="font-family:trebuchet ms,sans-serif;font-size:small"><font size="1">
</font></div></div></span></div></div></span></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 10 February 2017 at 03:10, Ulrike Fischer <span dir="ltr"><<a href="mailto:news3@nililand.de" target="_blank">news3@nililand.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>Am Fri, 10 Feb 2017 08:54:09 +0100 schrieb Zdenek Wagner:<br>
<br>
> OK, I have a newer version. Maybe the bug is known and was fixed just a few<br>
> days ago.<br>
<br>
</span>What do mean by that you have newer version? Your fontspec is from<br>
2016 and mine from 2017.<br>
<br>
And yes the bug is known. I discussed it two weeks ago with Will.<br>
<div class="m_4019382697735664208HOEnZb"><div class="m_4019382697735664208h5"><br><span class="HOEnZb"><font color="#888888">
<br>
--<br>
Ulrike Fischer<br>
<a href="http://www.troubleshooting-tex.de/" rel="noreferrer" target="_blank">http://www.troubleshooting-tex<wbr>.de/</a><br>
<br>
<br>
<br>
------------------------------<wbr>--------------------<br>
Subscriptions, Archive, and List information, etc.:<br>
  <a href="http://tug.org/mailman/listinfo/xetex" rel="noreferrer" target="_blank">http://tug.org/mailman/listinf<wbr>o/xetex</a><br>
</font></span></div></div></blockquote></div><br></div></div>
<br><br>
<br>
------------------------------<wbr>--------------------<br>
Subscriptions, Archive, and List information, etc.:<br>
  <a href="http://tug.org/mailman/listinfo/xetex" rel="noreferrer" target="_blank">http://tug.org/mailman/<wbr>listinfo/xetex</a><br>
<br></blockquote></div><br></div>