04-08-2023, 09:20 AM
(This post was last modified: 04-08-2023, 11:49 AM by PhilOfPerth.)
Thanks Steve. I got that working ok, choosing an Arial font, size 24, bold.
But the Tab() function seems to not work normally any more. I would expect this code:
SCREEN _NEWIMAGE(1200, 640, 32)
f& = _LOADFONT("c:\WINDOWS\Fonts\arial.ttf", 24, "bold")
_FONT f&
PRINT STRING$(79, "X")
PRINT "Screen width is 80 chars"
LOCATE 4, 38: PRINT "Middle": SLEEP
to print the first two lines normally ( a line of "X"s, then the message) which it does, and the next line to print "Middle" in the centre of line 4.
but instead, it prints this at tab position 4 on line 4. What did I get wrong?
Edit:
S'okay, I found it. I was not using a monospaced font. Adding"monospace" gave the correct result.
But the Tab() function seems to not work normally any more. I would expect this code:
SCREEN _NEWIMAGE(1200, 640, 32)
f& = _LOADFONT("c:\WINDOWS\Fonts\arial.ttf", 24, "bold")
_FONT f&
PRINT STRING$(79, "X")
PRINT "Screen width is 80 chars"
LOCATE 4, 38: PRINT "Middle": SLEEP
to print the first two lines normally ( a line of "X"s, then the message) which it does, and the next line to print "Middle" in the centre of line 4.
but instead, it prints this at tab position 4 on line 4. What did I get wrong?
Edit:
S'okay, I found it. I was not using a monospaced font. Adding"monospace" gave the correct result.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/