0024272: Provide basic text formatting routines for Font_BRepFont
[occt.git] / tests / 3rdparty / fonts / B1
CommitLineData
b514beda 1puts "============"
2puts "OCC24181 Render text as BRep"
3puts "============"
4puts ""
5pload MODELING
6pload VISUALIZATION
7
8set THE_TEXT "The quick brown fox\njumps over the lazy dog!"
9set THE_FONT_NAME Times-Roman
10set THE_FONT_SIZES {12 18 24}
11
12vsetdispmode 1
13vtop
14
15set aLine 0
29e2c6d2 16set aLineId 0
b514beda 17foreach aSize $THE_FONT_SIZES {
18 set aText "\[$aSize\] $THE_TEXT"
19
20 vpoint aPnt_$aSize 0.0 $aLine 0.0
29e2c6d2 21 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
b514beda 22
ac84fcf6 23 text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite off -pos 0.0 $aLine 0.0 -valign topfirstline
b514beda 24 vdisplay aBText_$aSize
25 set aLine [expr $aLine - 4.0 * $aSize]
29e2c6d2 26 set aLineId [expr $aLineId + 1]
b514beda 27}
28
29vfit