fontspec
fontspec copied to clipboard
Add API for babel's check for languages/scripts
Description
Babel currently has some code:
\<keys_if_exist:nnF>{fontspec-opentype}{Script/\bbl@cs{sname@#1}}%
{\\\newfontscript{\bbl@cs{sname@#1}}{\bbl@cs{sotf@#1}}}%
\<keys_if_exist:nnF>{fontspec-opentype}{Language/\bbl@cs{lname@#1}}%
{\\\newfontlanguage{\bbl@cs{lname@#1}}{\bbl@cs{lotf@#1}}}}}
This will break if I ever change fontspec's keyval processing. But I could add something like \fontspec_if_script_option_defined:nTF or similar.
If you see the diff you will notice this piece of code was already there, but commented out. The reason is twofold: I was not sure it was the way to go, and I don't like to resort to low-level macros.