Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
This program causes QB64 to crash - SOLVED
#1
The small screen resolution when using the font causes an error for me - the program has stopped working and will be terminated. I am attaching the font used to test if it will behave the same on your systems. I understand that the screen height is set small, but if you are debugging a large program, this type of error will definitely be very annoying to deal with.
Code: (Select All)
$NoPrefix
Screen _NewImage(800, 64, 32)
F& = LoadFont("BKANT.ttf", 72, "Bold")
Font F&
Print "QB64 Phoenix Edition"

Bug occur in QB64PE 32bit 3.5.0 and also in QB64PE 64bit 3.6.0

font is not attached more, because problem solved using PrintString. Thanks to Mnrvovfrc (in next reply.)


Reply
#2
Notice if we set NewImage's Y axis to 215, the font text will printed and disappear in moment cca (half second). Strange. If we set the Y-axis value to 216, the text will remain on the screen. But the font size is 72 (this value is also returned by the FontHeight function), so the minimum usable screen size should be 73 pixels in height - but if is screen height lower than 215, is screen without text.

Code: (Select All)
$NoPrefix
Screen _NewImage(800, 215, 32)
F& = LoadFont("BKANT.ttf", 72, "Bold")
Font F&
Print "QB64 Phoenix Edition"
FH = _FontHeight

Line (0, FH + 1)-(_Width - 1, FH + 1)
Sleep


Reply
#3
I hope this font is freeware. Please respect copyright.

Use "_PRINTSTRING" instead of "PRINT".
Reply
#4
For me, no crash nor Print just a line drawn. v3.6 on Windows 10-64 laptop
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)