1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-09 10:45:13 +00:00
QB64-PE/internal
Matthew Kilgore fcec53e55b Fix text wrapping on last column with variable width fonts
Currently there is a bug where if a variable width font is in use and
text printed would exactly fit to the end of the row, it is instead
wrapped and printed on the next line.

Ex. You're printing a character that is 10 pixels wide, starting
from position 90 on an image that is 100 pixels wide. This should fix,
but instead your character will be printed on the next line.

The reason this happens is an off by one error, cursor_x (effectively
the X value passed to LOCATE) is one based even when using a variable
width font where cursor_x represents a pixel location. The location that
check if the next character can fit on the screen never handles the base
one, so it ends up treating the ending Y coordinate as one past where it
will actually end, which makes the code thing the print will go past the
edge of the screen.

To fix we simply subtract one before doing the comparison to give us the
actual ending pixel column.
2022-05-06 17:50:07 -04:00
..
c Fix text wrapping on last column with variable width fonts 2022-05-06 17:50:07 -04:00
help add default QB64_Help_Menu.txt 2022-04-28 13:42:00 -04:00
source Automatic update of ./internal/source 2022-05-06 20:54:54 +00:00
support $Color fix with $NoPrefix 2022-04-28 17:20:45 -04:00
temp Corrected OSX setup script to use OSX folder instead of Linux one. 2015-12-14 11:17:09 +11:00
clean.bat (Automated push) Update internal/source/* from qb64.bas 2015-08-02 05:12:44 -07:00