[XeTeX] fontspec_if_current_script or \fontspec_if_script functions of fontspec
VAFA KHALIGHI
vafaklg at gmail.com
Sat Sep 17 11:14:48 CEST 2011
Why this always returns "non-RTL script"?
\documentclass{article}
\usepackage{fontspec}
\makeatletter
\newif\if at Latin
\ExplSyntaxOn
\fontspec_if_current_script:nTF {arab} {\@Latinfalse} {\@Latintrue}
\ExplSyntaxOff
\def\test{\if at 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}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110917/3c1b5fcf/attachment.html>
More information about the XeTeX
mailing list