1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-10 12:25:50 +03:00
kgv 15e4e6a23e 0031118: Visualization - Font_FontMgr skips fonts with unknown styles like Narrow or Black
Extended Style name is now appended to Family name for unique identification of the font.
vfont -find now accepts mask to search the font and returns family name.
2019-11-13 18:34:33 +03:00

27 lines
782 B
Plaintext

puts "================"
puts "0031118: Visualization - Font_FontMgr skips fonts with unknown styles like Narrow or Black"
puts "================"
puts ""
dtracelevel trace
pload VISUALIZATION
# Do the trick - find any pair of fonts with and without "Narrow" style suffix.
# On Windows it might be "Arial" and "Arial Narrow", on Linux "Liberation Sans" and "Liberation Sans Narrow".
vfont -verbose 1
set aFontN [vfont -strict -find "* Narrow"]
set aFontR [string map {" Narrow" ""} $aFontN]
vfont -strict -findInfo "$aFontN"
vfont -strict -findInfo "$aFontR"
vclear
vinit View1
vpoint p0 0 0 0
vpoint p1 0 10 0
vdrawtext t1 "My Text \[$aFontR\]" -font "$aFontR" -pos 0 5 0
vdrawtext t2 "My Text \[$aFontN\]" -font "$aFontN" -pos 0 6 0
vtop
vfit
vdump $imagedir/${casename}.png