Why this always returns "non-RTL script"?

 \documentclass{article}

\usepackage{fontspec}

\makeatletter

\newif\if@Latin

\ExplSyntaxOn

\fontspec_if_current_script:nTF {arab} {\@Latinfalse} {\@Latintrue}

\ExplSyntaxOff

\def\test{\if@Latin non-RTL script\else RTL script\fi}

\newfontfamily\rlfont[Script=Arabic]{IranNastaliq}

\newfontfamily\lrfont[Path,Script=Latin]{lmroman12-regular}

\makeatother

\begin{document}

\begingroup

\rlfont

\test

\endgroup

\begingroup

\lrfont

\test

\endgroup

\end{document}

--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to