mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
Introduce new class Font_BRepFont for conversion of font glyph in vector format into BRep representation. New text2brep Draw Harness command. bottle.tcl - draw text on the bottle side using new functionality. ViewerTest - process Delete key in 3D-Viewer to delete selected presentations. Font_FontMgr::FindFont - return correct font when font alias and not default aspect is requested. bottle.tcl - use prism instead of pipe TKViewerTest - add required FreeType dependency verase - display the list of erase objects TKViewerTest - add required FreeType dependency for projects generation
29 lines
673 B
Plaintext
29 lines
673 B
Plaintext
puts "============"
|
|
puts "OCC24181 Render text as BRep (composite curve)"
|
|
puts "============"
|
|
puts ""
|
|
pload MODELING
|
|
pload VISUALIZATION
|
|
|
|
set THE_TEXT "The quick brown fox\njumps over the lazy dog!"
|
|
set THE_FONT_NAME Times-Roman
|
|
set THE_FONT_SIZES {12 18 24}
|
|
|
|
vsetdispmode 1
|
|
vtop
|
|
|
|
set aLine 0
|
|
foreach aSize $THE_FONT_SIZES {
|
|
set aText "\[$aSize\] $THE_TEXT"
|
|
|
|
vpoint aPnt_$aSize 0.0 $aLine 0.0
|
|
vdrawtext $aText 0.0 $aLine 0.0 000 255 255 0 2 000 1 $aSize 4 $THE_FONT_NAME
|
|
|
|
text2brep aBText_$aSize $aText $THE_FONT_NAME $aSize bolditalic composite=1
|
|
ttranslate aBText_$aSize 0.0 $aLine 0.0
|
|
vdisplay aBText_$aSize
|
|
set aLine [expr $aLine - 4.0 * $aSize]
|
|
}
|
|
|
|
vfit
|