0024387: Tests - use system-independent fonts in test cases
[occt.git] / tests / 3rdparty / fonts / B1
CommitLineData
b514beda 1puts "============"
2puts "OCC24181 Render text as BRep"
3puts "============"
4puts ""
5pload MODELING
6pload VISUALIZATION
7
6fb1a930 8vfont add [locate_data_file DejaVuSans.ttf] SansFont
9
b514beda 10set THE_TEXT "The quick brown fox\njumps over the lazy dog!"
6fb1a930 11set THE_FONT_NAME SansFont
b514beda 12set THE_FONT_SIZES {12 18 24}
13
14vsetdispmode 1
15vtop
16
17set aLine 0
29e2c6d2 18set aLineId 0
b514beda 19foreach aSize $THE_FONT_SIZES {
20 set aText "\[$aSize\] $THE_TEXT"
21
22 vpoint aPnt_$aSize 0.0 $aLine 0.0
29e2c6d2 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
b514beda 24
ac84fcf6 25 text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite off -pos 0.0 $aLine 0.0 -valign topfirstline
b514beda 26 vdisplay aBText_$aSize
27 set aLine [expr $aLine - 4.0 * $aSize]
29e2c6d2 28 set aLineId [expr $aLineId + 1]
b514beda 29}
30
31vfit