1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/tests/3rdparty/fonts/B2
isk 6fb1a930e2 0024387: Tests - use system-independent fonts in test cases
Add a new parameter "-font FontName" to the command "vdimension".
Tuning of test-cases
2015-08-27 15:30:18 +03:00

32 lines
888 B
Plaintext

puts "============"
puts "OCC24181 Render text as BRep (composite curve)"
puts "============"
puts ""
pload MODELING
pload VISUALIZATION
vfont add [locate_data_file DejaVuSans.ttf] SansFont
set THE_TEXT "The quick brown fox\njumps over the lazy dog!"
set THE_FONT_NAME SansFont
set THE_FONT_SIZES {12 18 24}
vsetdispmode 1
vtop
set aLine 0
set aLineId 0
foreach aSize $THE_FONT_SIZES {
set aText "\[$aSize\] $THE_TEXT"
vpoint aPnt_$aSize 0.0 $aLine 0.0
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
text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite on -pos 0.0 $aLine 0.0 -valign topfirstline
vdisplay aBText_$aSize
set aLine [expr $aLine - 4.0 * $aSize]
set aLineId [expr $aLineId + 1]
}
vfit