Hello, this might help.
!2D-code-----------------------------------------------
txt="Lorem ipsum"
define style "style01" "Arial", (2.5/A_)*A_, 5, 0
set style "style01"
length_txt=STW(txt)/1000*A_
text2 0, 0, txt
line2 -a/2, 0, -length_txt/2, 0
line2 a/2, 0, length_txt/2, 0
hotspot2 0, 0
hotspot2 -a/2, 0
hotspot2 a/2, 0
!-------------------------------------------------------
--
Regards, Juha