Pomax / ucharclasses

A XeLaTeX package that lets you insert arbitrary code between characters from different unicode blocks
14 stars 4 forks source link

Variation Selectors support? #29

Open mohamedkady opened 4 years ago

mohamedkady commented 4 years ago

Thank you very much for writing this package. I noticed that in some older documentation Variation Selectors was a supported block but now it is not, is there a reason for that? Without it, using characters that require specific variants (example depicted below) will throw ucharclasses into a block it doesn't recognize, causing problems when trying to use a \setDefaultTransitions{\begingroup\whateverfont}{\endgroup} setup.

image

lemzwerg commented 2 years ago

The thing is that a block for Variation Selectors (VS) doesn't make sense for ucharclasses.sty: there is more than one script that uses VS – how shall ucharclasses decide which is the correct one?

I think it's rather a documentation problem: It should explicitly be mentioned that variation selectors cannot be supported; people should instead use explicit language environments (as provided by the babel or polyglossia packages).

Pomax commented 2 years ago

As Werner mentions, we can't really do anything with the variation selectors block, as ucharclasses injects font switching code based on block transitions. Since VS aren't "a block on their own", coming up with logic that makes it do the right thing for every other block that VS can interact with might be possible, but would be extremely far from trivial.

Updating the docs to make this clear is a good idea though, marking this as an enhancement issue.