2 puts "OCC24181 Render text as BRep"
8 vfont add [locate_data_file DejaVuSans.ttf] SansFont
10 set THE_TEXT "The quick brown fox\njumps over the lazy dog!"
11 set THE_FONT_NAME SansFont
12 set THE_FONT_SIZES {12 18 24}
19 foreach aSize $THE_FONT_SIZES {
20 set aText "\[$aSize\] $THE_TEXT"
22 vpoint aPnt_$aSize 0.0 $aLine 0.0
23 vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color 0.0 1.0 1.0 -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
25 text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite off -pos 0.0 $aLine 0.0 -valign topfirstline
26 vdisplay aBText_$aSize
27 set aLine [expr $aLine - 4.0 * $aSize]
28 set aLineId [expr $aLineId + 1]