Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing font-size in _rgb32 mode
#16
Code: (Select All)
Screen _NewImage(800, 600, 32)
h& = _LoadFont("C:\Windows\Fonts\courbd.ttf", 18)
_Font h&
For i = 1 To 33
    Locate i, i: Print i;
Next
Sleep


Locate 400, 300 'This will ERROR on you as it's waaay off the screen
Locate 20, 300: Print "Hello after the ERROR"
Sleep
System


An example to showcase the error for you and why you're seeing it.

Notice without the "monospace" being specificized, the second half of the locate is working with a basic fontwidth of 1 pixel (the smallest possible), but the first half of the locate is -- like always -- in relation to the row we want to print upon.

At LOCATE 400, 300, we generate an error as we simply don't have 400 lines upon the screen with which to print to.
Reply


Messages In This Thread
RE: Changing font-size in _rgb32 mode - by bplus - 04-08-2023, 01:51 PM
RE: Changing font-size in _rgb32 mode - by bplus - 04-08-2023, 05:10 PM
RE: Changing font-size in _rgb32 mode - by SMcNeill - 04-08-2023, 10:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Enlarging window for older BAS programs (ie. Screen 7 mode) paulel 5 422 12-24-2025, 09:36 PM
Last Post: paulel
  Font Size in Threads Dimster 5 377 12-12-2025, 04:49 PM
Last Post: Dimster
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 11 1,084 11-10-2025, 07:23 PM
Last Post: madscijr
  auto-detecting screen resolution for optimal window size on non-Windows systems madscijr 0 227 10-26-2025, 06:58 PM
Last Post: madscijr
  Problem with font in Teletext browser. SquirrelMonkey 7 763 08-27-2025, 11:38 AM
Last Post: BDS107

Forum Jump:


Users browsing this thread: 1 Guest(s)