Implement a new GDI print commnd TEXTRIGHT for right-justified output:
//TEXTRIGHT, x, y, text
The logic is the same as for //TEXTOUT, except that the specified xy position marks the right edge of the output rather than the left edge. Note that the vertical position with respect to the reference point is still determined by the //SETTEXTALIGN options.