Since the old patches no longer apply, I updated https://gist.github.com/jjgod/c1194a9b371848aaa746 with first patch rewritten. As you all can see, it is possible to do it in legacy dvipdfm-x code, just more tedious, I'm not sure what benefit that gives. Then again, I don't care that much as long as it works. - Jiang