| TextProp | TCL UTILITIES USER MANUAL | TextProp |
|---|
| TextProp  |
|
| Size | - | The text size in points (1/72 inch). |
| Font | - | An optional input which specifies the current text font. The default value is HOLD which keeps the currently loaded font. If a requested font is not available on the system, the software will attempt to make a best match to one which is available. |
| Bold | - | An optional input which specifies if text should be output bold or not. The default value is HOLD which keeps the currently selected bold state. Set to ON for bold text and OFF for normal text. |
| Italics | - | An optional input which specifies if text should be output in italics or not. The default value is HOLD which keeps the currently selected italic state. Set to ON for italic text and OFF for normal text. |
# INITIALIZE the default gui settings
GUIprefsRead
# SET a window size
set GphInfo(xsScrL) 600
set GphInfo(ysScrL) 500
set GphInfo(xScrL) 600
set GphInfo(yScrL) 500
# START graphics
GraphicsOn TK RainBow SWAP
# ESTABLISH a graphics window coverting the whole canvas
GenWindow 0 0.0 0.0 0.0 1.0 1.0 1.0 -6.0 -6.0 0.0 6.0 6.0 0.0
# OUTPUT these fonts with these sizes
set FonTs [list fixed times helvetica lucidabright utopia courier]
set nF [llength $FonTs]
set Sizes [list 10 14]
set nS [llength $Sizes]
# SET up dual loops. Outer loops over fonts and inner over sizes. Foreach
# font and size show bold, italic, and bold italic text.
set Y 5.5
for { set J 0 } { $J < $nF } { incr J } {
set Ft [lindex $FonTs $J]
for { set I 0 } { $I < $nS } { incr I } {
set Sz [lindex $Sizes $I]
TextProp $Sz $Ft
TexT 0 -5.5 $Y 0.0 right "$Ft - Size $Sz" $GphInfo(White)
puts stderr [font actual $Ft]
TextProp $Sz HOLD ON
TexT 0 -1.0 $Y 0.0 right Bold $GphInfo(White)
TextProp $Sz HOLD OFF ON
TexT 0 0.5 $Y 0.0 right Italics $GphInfo(White)
TextProp $Sz HOLD ON ON
TexT 0 2.5 $Y 0.0 right "Bold Italics" $GphInfo(White)
set Y [expr $Y - 1.0]
}
}
| Feb 15, 2007 |
|---|