puts "============"
puts "OCC24181 Render text as BRep (composite curve)"
puts "============"
puts ""
pload MODELING
pload VISUALIZATION

set THE_TEXT "The quick brown fox\njumps over the lazy dog!"
set THE_FONT_NAME Times-Roman
set THE_FONT_SIZES {12 18 24}

vsetdispmode 1
vtop

set aLine 0
foreach aSize $THE_FONT_SIZES {
  set aText "\[$aSize\] $THE_TEXT"

  vpoint aPnt_$aSize 0.0 $aLine 0.0
  vdrawtext $aText 0.0 $aLine 0.0 000 255 255 0 2 000 1 $aSize 4 $THE_FONT_NAME

  text2brep aBText_$aSize $aText $THE_FONT_NAME $aSize bolditalic composite=1
  ttranslate aBText_$aSize 0.0 $aLine 0.0
  vdisplay  aBText_$aSize
  set aLine [expr $aLine - 4.0 * $aSize]
}

vfit
