[lltx] fontspec push
Will Robertson
wspr81 at gmail.com
Mon Mar 8 10:39:24 CET 2010
Hi,
Found some time to concentrate on fontspec for a little while this evening. (Khaled, I'm sorry to keep doing this to you, but does this work under LuaTeX yet? I'm still having issues with luaotfload and external fonts on Mac OS X. I've been working with the code that was breaking before, so I might have fixed things up accidentally-on-purpose.)
Added the following "programmer's interface" with, I suspect, more to come eventually. Does this all make sense? More importantly, does fontspec even compile documents for you still?
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\ExplSyntaxOn
\fontspec{texgyrepagella-regular.otf}
\fontspec_if_script:nTF {cyrl} {True}{False}/
\fontspec_if_language:nTF {ROM} {True}{False?}/
\fontspec_if_language:nnTF {latn} {ROM} {True}{False?}/
\fontspec_if_feature:nTF {+pnum} {True} {False?}/
\fontspec_if_feature:nnnTF {latn} {ROM} {+pnum} {True} {False?}/
\par
Test~script:~
\fontspec[Script = Cyrillic]{texgyrepagella-regular.otf}
\fontspec_if_current_script:nTF {cyrl} {True}{False?}/
\fontspec_if_current_script:nTF {latn} {True?}{False}/
\par
Test~language:~
\fontspec[Language = Turkish]{texgyrepagella-regular.otf}
\fontspec_if_current_language:nTF {TRK} {True}{False?}/
\fontspec_if_current_language:nTF {ROM} {True?}{False}/
\end{document}
Oh, forgot to mention "\fontspec_if_fontspec_font:TF" and "\fontspec_if_opentype:TF" in there, which I suspect are probably way less useful.
-- Will
More information about the lualatex-dev
mailing list