It's a case of missing OPTION EXPLICIT and *math*. 
fg and bg are *undefined variables*, so you're setting a color of Transparent Black, Transparent Black... That's going to kill everything to start with.
Then the position of where you're trying to place the text is off, as you're trying to put it on pixel coordinates instead of text coordinates.

Code: (Select All)
'Prints string MyString stretched to xScale%, yScale%
'in the current _FONT
'to 32-bit screen at ColNum%,RowNum%
'where the width of 1 column is _FontWidth * xScale%
' and height of 1 row is _FontHeight * yScale%
'with foreground color fg~& and background color bg~&
Screen _NewImage(1280, 720, 32)
$Color:32
DrawString "Hello World", Red, Blue, 10, 10, 2, 2
Sub DrawString (MyString As String, fg~&, bg~&, ColNum%, RowNum%, xScale%, yScale%)
Dim SavedSource&
Dim SavedDest&
Dim MyImage&
Dim FontHandle&
Dim x1&, y1&, x2&, y2&, w1&, h1&
' remember the source / destination
SavedSource& = _Source
SavedDest& = _Dest
' get the font
FontHandle& = _Font
MyImage& = _NewImage(_UPrintWidth(MyString, , FontHandle&), _UFontHeight(FontHandle&), 32)
_Dest MyImage&
_Font FontHandle&
Color fg~&, bg~& 'YOU NEED TO REFERENCE THE PROPER VARIABLE NAMES HERE. SUFFIX!!!
_UPrintString (0, 0), MyString, , , FontHandle&, MyImage&
w1& = _Width(MyImage&) * xScale%
h1& = _Height(MyImage&) * yScale%
x1& = ColNum% * _FontWidth 'POSITION RELATIVE TO FONT SIZE
y1& = RowNum% * _UFontHeight 'MAYBE WANT FONTHEIGHT HERE FOR POSITIONING? IF SO, THEN PRINTSTING ABOVE
x2& = x1& + w1&
y2& = y1& + h1&
_PutImage (x1&, y1&)-(x2&, y2&), MyImage&, SaveDest&
' Restore the source/destination
_Source SavedSource&
_Dest SavedDest&
' Cleanup
_FreeImage MyImage&
End Sub ' DrawString
fg and bg are *undefined variables*, so you're setting a color of Transparent Black, Transparent Black... That's going to kill everything to start with.

Then the position of where you're trying to place the text is off, as you're trying to put it on pixel coordinates instead of text coordinates.

