If I understand you correctly, you are trying to set up a "boundry" where if text is displayed longer than say 2.5 inches then you want the font size to reduce until it fits.
If that is the case, here is what I use...
setstyle(&Style3)
define(&data, string,trim(@(30,1,100)))
define(&pcnt,integer,10)
define(&min,integer,6)
define(&lngth,measure,2.68)
define(&final,measure,6)
define(&sw,measure,stringwidth(&data))
for(&pcnt, 10, -1, &min)
setstyleext(&Style3,inttofloat(&pcnt),-1,-1,-1)
set(&sw,stringwidth(&data))
if((&sw < &lngth) and (&final = 6))
set(&final,inttofloat(&pcnt))
exit()
endif()
endfor()
setstyleext(&Style3,&final,-1,-1,-1)
show(&data)
---------------------------------------
Here is a quick run down.
&data is the line of text you are trying to output.
&pcnt is the font size you start at. (the for loop will then reduce this size by 1 until it fits.)
&min is the stopping point for the for loop.
&lngth is the length in inches of your boundry.
&final is the fail safe font size that you won't reduce below.