Closed pgmmpk closed 6 years ago
I can confirm that it works. However (this is a problem with color in general, not this particular code), correct positioning of marks is only achieved in LuaTeX using the package luacolor.
Compare: in LuaTeX using luacolor:
in XeTeX:
I guess the least we can do is change our documentation to compile with luatex.
Perhaps we should provide an option to turn off automatic coloring of marks? This could be useful if XeTeX / LuaTeX ever support COLR and CPAL tables in fonts. Looks like they're getting there: there is now support for it in HarfBuzz, they're developing an API: https://github.com/harfbuzz/harfbuzz/issues/849 So hopefully sometime soon it will be available in TeX.
Cool. I think the best option would be to sense the engine type and version and dynamically enable/disable automatic coloring. Lets wait for the first engine to support COLR/CPAL (whatever it is).
I think the COLR/CPAL mechanism will have one drawback - no grayscale/bw modes. Right?
Good question. I think it may be possible to use stylistic sets to turn palettes off and on, but I have not tried it.
Of course, a trivial solution is just to provide a bw version of the font with no color data.
To test, one can compile this: