[XeTeX] fontspec_if_current_script or \fontspec_if_script functions of fontspec
VAFA KHALIGHI
vafaklg at gmail.com
Sun Sep 18 09:11:44 CEST 2011
Thanks. It was my fault.
On Sun, Sep 18, 2011 at 4:44 PM, Will Robertson <wspr81 at gmail.com> wrote:
> On 2011-09-17 18:44:48 +0930, VAFA KHALIGHI <vafaklg at gmail.com> said:
>
> Why this always returns "non-RTL script"?
>>
>> \newif\if at 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<http://tug.org/mailman/listinfo/xetex>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/xetex/attachments/20110918/db7cf0da/attachment-0001.html>
More information about the XeTeX
mailing list