Files
OCCT/tests/3rdparty/fonts/B2
kgv 5b377041e3 0030439: Visualization - extend fonts search within Font_FontMgr::FindFont() on Linux
Font_FontMgr has been redesigned to:
- Store fonts in a map instead a list.
- Allow mapping multiple fonts to a single alias.
- Log informative message about usage of non-requested font (fallback).
- Register all font files within standard folders on Linux when "fonts.dir" is not found.
- Prefer specific alias ("serif") as default fallback font instead of arbitrary one in a system.

A couple of obsolete and broken font aliases have been removed;
instead, new aliases of fonts popular on Linux platform have been added.

Font_NameOfFont.hxx has been extended with more neutral aliases
"monospace", "serif", "sans-serif", "cjk" and "korean".

Font_FontAspect enumeration values have been renamed Font_FA_ -> Font_FontAspect_
with old values preserved as alias.

Font_SystemFont has been extended with a list of paths to Font_FontAspect styles,
so that entire Font Family is now defined within a single Font_SystemFont instance.
Non-resizable fonts are now ignored by Font Manager.
2019-01-21 16:15:33 +03:00

36 lines
943 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 sans-serif
set THE_FONT_SIZES {12 18 24}
vsetdispmode 1
vtop
dtracelevel trace
vfont -verbose 1
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
vglinfo
checkview -screenshot -3d -path ${imagedir}/${test_image}.png