<div dir="ltr">Thanks. It was my fault.<br><br><div class="gmail_quote">On Sun, Sep 18, 2011 at 4:44 PM, Will Robertson <span dir="ltr"><<a href="mailto:wspr81@gmail.com">wspr81@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 class="im">On 2011-09-17 18:44:48 +0930, VAFA KHALIGHI <<a href="mailto:vafaklg@gmail.com" target="_blank">vafaklg@gmail.com</a>> said:<br>
<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Why this always returns "non-RTL script"?<br>
<br></div>
\newif\if@Latin<div class="im"><br>
\fontspec_if_current_script:<u></u>nTF {arab} {\@Latinfalse} {\@Latintrue}<br>
</div></blockquote>
<br>
I wondered if the documentation for this feature needed work, but it seems okay if a little terse: "Test whether the currently loaded font is using the specified raw OpenType script tag #1."<br>
<br>
This is, you have to execute the conditional after you've selected the font:<br>
<br>
\documentclass{article}<br>
\usepackage{fontspec}<br>
\ExplSyntaxOn<br>
\def\test{<br>
 \fontspec_if_current_script:nF {arab} {non-}<br>
 RTL~ script<br>
}<br>
\ExplSyntaxOff<br>
\newfontfamily\rlfont[Script=<u></u>Arabic]{XB Zar}<div class="im"><br>
\newfontfamily\lrfont[Path,<u></u>Script=Latin]{lmroman12-<u></u>regular}<br></div>
\begin{document}<br>
{\rlfont\test}<br>
{\lrfont\test}<br>
\end{document}<br>
<br>
Hope this helps,<br>
Will<br>
<br>
<br>
<br>
<br>
------------------------------<u></u>--------------------<br>
Subscriptions, Archive, and List information, etc.:<br>
 <a href="http://tug.org/mailman/listinfo/xetex" target="_blank">http://tug.org/mailman/<u></u>listinfo/xetex</a><br>
</blockquote></div><br></div>