In this anser, I suggested using morbusg's solution to produce outlined text with XeLaTeX. This does what it says on the tin:
\documentclass{article}
\begin{document}
% ref https://tex.stackexchange.com/a/108348/ by morbusg
\special{pdf:bcolor [.8 0 .8] [0]} % two arrays: first defines fill, second the stroke.
% If array has one entry, it's meaning grayscale, if three: RGB, if four: CMYK.
\special{pdf:literal direct .4 w 2 Tr} % .4 here is the stroke width
Here is some text.
\end{document}

which is great.
However, now Artefact2 wants not only to turn the effect on but, of all extravagant things, to switch it off as well and, although I can come up with methods which work, I'm not sure which, if any is correct.
How should the effect be switched off?
\special{pdf:bcolor [0] [0]}
\special{pdf:literal direct 0 w 0 Tr}
works. So does replacing the first line with
\special{pdf:bcolor 0}
which I think might be better, based on my attempt to interpret http://project.ktug.org/dvipdfmx/doc/tug2005.pdf. But, really, I have no idea.
If there is a standard reference or manual for checking this kind of thing, I would be especially grateful for a pointer.
Also, I have no idea how this should be tagged ....

q,Qsledgehammer. – David Carlisle Feb 18 '17 at 01:24