When printing characters in the JIS range using the \f prefix in the gsFontM module, centered or right-aligned text is measured based on the full string length including the four digit character code and the \f character.
i.e. a string of "\f0062 Enter" is treated as 11 characters long, rather than 7.
The same goes for the \e helper, though due to the variable lengths this one probably requires a more complex solution.
I haven't been able to build gsKit myself but I believe this patch would help, if my maths is right, presuming that the programmer didn't input an invalid character code:
When printing characters in the JIS range using the
\f
prefix in thegsFontM
module, centered or right-aligned text is measured based on the full string length including the four digit character code and the\f
character.i.e. a string of
"\f0062 Enter"
is treated as 11 characters long, rather than 7.The same goes for the
\e
helper, though due to the variable lengths this one probably requires a more complex solution.I haven't been able to build
gsKit
myself but I believe this patch would help, if my maths is right, presuming that the programmer didn't input an invalid character code: