Here is alternate way to handle font sheet I came up with 7 years ago:
Here I used Cyber Font 2 years later in New Years message
Font sheet I used and background image with source in zip
Code: (Select All)
_Title "Cyber font test.bas by bplus started 2018-06-30"
'from Rotate Image.bas started bplus 2018-06-17
'QB64 version 2017 1106/82 (the day before they switched to version 1.2)
Const xmax = 800
Const ymax = 600
Dim Shared pi
pi = _Pi
Screen _NewImage(xmax, ymax, 32)
_ScreenMove 360, 60
backImage& = _LoadImage("Stars.png")
Dim Shared cf&, cfW, cfH
cf& = _LoadImage("Cyber font.bmp")
cfW = 40
cfH = 34
_PutImage , backImage&, 0
bx = 100: by = 150: bw = 600: bh = 50
M$ = "bplus was here! June 30, 2018"
Line (bx, by)-Step(bw, bh), _RGB32(128, 0, 0), BF
cfMessage M$, bx, by, bw, bh
M$ = "bplus gives this demo a B?"
bx = 50: by = 300: bw = 700: bh = 200
'LINE (bx, by)-STEP(bw, bh), _RGB32(128, 255, 255), BF
cfMessage M$, bx, by, bw, bh
cfMessage "Background is Johnno's Stars.png", 100, 10, 600, 100
Sub cfMessage (message$, xBox, yBox, wBox, hBox)
lm = Len(message$)
bm = .125 * hBox
px = lm * (cfW + bm) + 2 * bm
py = cfH + 2 * bm
xScale = wBox / px
yScale = hBox / py
For i = 1 To Len(message$)
c$ = Mid$(message$, i, 1)
cfLetter c$, xBox + (i - 1) * (cfW + bm) * xScale + bm, yBox + bm, xScale, yScale
Next
End Sub
Sub cfLetter (L$, x, y, xScale, yScale)
_ClearColor _RGB32(0, 0, 0), cf&
lNum = InStr("ABCDEFGHIJKLMNOPQRSTUVWXYZ!'()-.?:0123456789, ", UCase$(L$))
If lNum = 0 Then Exit Sub ' couldn't find it
lNum = lNum - 1
lRow = lNum \ 8 '5 + rows
lCol = lNum Mod 8 '8 chars per row
lW = 40
lH = 34
_PutImage (x, y)-Step(lW * xScale, lH * yScale), cf&, 0, (lCol * lW, lRow * lH)-Step(lW - 1, lH - 1)
End Sub
Here I used Cyber Font 2 years later in New Years message

Font sheet I used and background image with source in zip
b = b + ...