0032208: Tests - refactor visualization tests to cover several graphic drivers
[occt.git] / tests / v3d / fonts / B7
1 puts "============"
2 puts "0030663: Visualization - synthesize italic style for a font having no italic style"
3 puts "============"
4 puts ""
5 pload MODELING VISUALIZATION
6
7 set THE_TEXT "The quick brown fox\njumps over the lazy dog!"
8 set THE_FONT_NAME SansFont
9 set THE_FONT_SIZES {12 18 24}
10
11 # register font having only Regular style
12 vfont add [locate_data_file DejaVuSans.ttf] SansFont
13
14 vinit View1
15 vtop
16
17 dtracelevel trace
18 vfont -verbose 1
19
20 set aLine 0
21 set aLineId 0
22 foreach aSize $THE_FONT_SIZES {
23   set aText "\[$aSize\] $THE_TEXT"
24
25   vpoint aPnt_$aSize 0.0 $aLine 0.0
26   vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color CYAN -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
27
28   text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite off -pos 0.0 $aLine 0.0 -valign topfirstline
29   vdisplay -dispMode 1 aBText_$aSize
30   set aLine [expr $aLine - 4.0 * $aSize]
31   set aLineId [expr $aLineId + 1]
32 }
33
34 vfit
35 vglinfo
36 vdump $imagedir/${casename}.png