1bbd7c79 |
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 | vtop |
15 | |
16 | dtracelevel trace |
17 | vfont -verbose 1 |
18 | |
19 | set aLine 0 |
20 | set aLineId 0 |
21 | foreach aSize $THE_FONT_SIZES { |
22 | set aText "\[$aSize\] $THE_TEXT" |
23 | |
24 | vpoint aPnt_$aSize 0.0 $aLine 0.0 |
aaf8d6a9 |
25 | 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 |
1bbd7c79 |
26 | |
27 | text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite off -pos 0.0 $aLine 0.0 -valign topfirstline |
28 | vdisplay -dispMode 1 aBText_$aSize |
29 | set aLine [expr $aLine - 4.0 * $aSize] |
30 | set aLineId [expr $aLineId + 1] |
31 | } |
32 | |
33 | vfit |
34 | |
35 | vglinfo |
36 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |