you're welcome to make a tutorial on _printstring and _printwidth using: `'* fontmovedemo.bas by codeguy`

oscreenh& = _SCREENIMAGE

oscreenw% = _WIDTH(oscreenh&)

oscreenh% = _HEIGHT(oscreenh&)

DemoScreenh& = _NEWIMAGE(oscreenw%, oscreenh%, 256)

SCREEN DemoScreenh&

DIM SHARED demo$(4), xi%(4), yi%(4), x%(4), y%(4), wqb64%(4), fntheight%

fntheight% = 30

fontLoad& = _LOADFONT("C:\windows\fonts\lucon.ttf", fntheight%)

_FONT fontLoad&

demo$(0) = "* QB64 *"

demo$(1) = "It's"

demo$(3) = "More Powerful"

demo$(4) = "Than Ever!"

FOR i = 0 TO 4

wqb64%(i) = _PRINTWIDTH(demo$(i))

xi%(i) = 3 + INT(5 - RND * 5) OR 1

yi%(i) = 3 + INT(5 - RND * 5) OR 1

x%(i) = INT(RND * (oscreenw% - wqb64%(i)))

y%(i) = INT(RND * (oscreenh% - fntheight%))

NEXT

DO

CLS

FOR i = 0 TO 4

IF x%(i) < 0 THEN

xi%(i) = -xi%(i)

'COLOR INT(RND * 15) + 1

ELSEIF x%(i) > oscreenw% - wqb64%(i) THEN

xi%(i) = -xi%(i)

'COLOR INT(RND * 15) + 1

END IF

x%(i) = x%(i) + xi%(i)

IF y%(i) < 0 THEN

yi%(i) = -yi%(i)

'COLOR INT(RND * 15) + 1

ELSEIF y%(i) > oscreenh% - fntheight% THEN

yi%(i) = -yi%(i)

'COLOR INT(RND * 15) + 1

END IF

y%(i) = y%(i) + yi%(i)

centerx% = (oscreenw% - wqb64%(i)) / 2

centery% = (oscreenh% - fntheight%) / 2

_PRINTSTRING (x%(i), y%(i)), demo$(i), DemoScreenh&

'_PRINTSTRING (centerx%, y%(i)), demo$(i), DemoScreenh&

'_PRINTSTRING (x%(i), centery%), demo$(i), DemoScreenh&

'_PRINTSTRING (centerx%, centery%), demo$(i), DemoScreenh&

FOR j% = 0 TO 4

IF j% <> i THEN

Detect i, j%

END IF

NEXT

NEXT

'_LIMIT 100

_DISPLAY

LOOP UNTIL INKEY$ > ""

SCREEN 0

_FREEIMAGE oscreenh&

_FREEIMAGE DemoScreenh&

SYSTEM

SUB Detect (i%, j%)

IF x%(i%) >= x%(j%) THEN

x1i% = x%(i%)

x2i% = x%(i%) + wqb64%(i%)

y1i% = y%(i%)

y2i% = y%(i%) + fntheight%

x1j% = x%(j%)

x2j% = x%(j%) + wqb64%(j%)

y1j% = y%(j%)

y2j% = y%(j%) + fntheight%

ELSE

x1i% = x%(j%)

x2i% = x%(j%) + wqb64%(j%)

y1i% = y%(j%)

y2i% = y%(j%) + fntheight%

x1j% = x%(i%)

x2j% = x%(i%) + wqb64%(i%)

y1j% = y%(i%)

y2j% = y%(i%) + fntheight%

END IF

IF x1i% >= x1j% AND x1i% <= x2j% THEN

IF y1i% >= y1j% AND y1i% <= y2j% THEN

xi%(i%) = -xi%(i%)

xi%(j%) = -xi%(j%)

yi%(i%) = -yi%(i%)

yi%(j%) = -yi%(j%)

END IF

END IF

END SUB

from original post: http://www.qb64.net/forum/index.php?topic=1587.msg13757#msg13757