On 2011-09-17 18:44:48 +0930, VAFA KHALIGHI
<vafa...@gmail.com> said:
Why this always returns "non-RTL script"?
\newif\if@Latin
\fontspec_if_current_script:nTF {arab} {\@Latinfalse} {\@Latintrue}
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."
This is, you have to execute the conditional after you've selected the font:
\documentclass{article}
\usepackage{fontspec}
\ExplSyntaxOn
\def\test{
\fontspec_if_current_script:nF {arab} {non-}
RTL~ script
}
\ExplSyntaxOff
\newfontfamily\rlfont[Script=Arabic]{XB Zar}
\newfontfamily\lrfont[Path,Script=Latin]{lmroman12-regular}
\begin{document}
{\rlfont\test}
{\lrfont\test}
\end{document}
Hope this helps,
Will
--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
http://tug.org/mailman/listinfo/xetex