How to invert text in verifone vx520
I want to invert the text in a string and the other strings are displayed fine and no inversion in verifone vx520. I am using the inverse_toggle () function, but this function inverts the whole page, not the string. how can I invert only the line and the other lines show as usual?
here is my code:
int display = open(DEV_CONSOLE, 0);
inverse_toggle();
write(display,"first line to inverse\n",22); //i want to inverse just this line
write(display,"second line shown normally\n",27);//i want to show this line normally
source to share
I've never played with inverse_toggle
or setinverse
, but I notice that you don't turn it off. Try the following:
int display = open(DEV_CONSOLE, 0);
inverse_toggle();
write(display,"first line to inverse\n",22);
inverse_toggle(); // new line
write(display,"second line shown normally\n",27);
For more control, use setinverse
. Also check display_at
. I think you will find it a more user-friendly option thanwrite
int display = open(DEV_CONSOLE, 0);
setinverse(1); // explicitly turn inverse on
display_at(1, // x
1, // y
"first line to inverse", // no /n needed since we are specifying x and y
NO_CLEAR); //defined in ACLCONIO.H. Other options are CLR_LINE and CLR_EOL
setinverse(0); // explicitly turn inverse off
display_at(1, 2, display,"second line shown normally", NO_CLEAR);
If that doesn't work, you can always use the font tool to create a new font (although that will be more work).
source to share