summaryrefslogtreecommitdiffstats
path: root/doc/font.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/font.n')
-rw-r--r--doc/font.n24
1 files changed, 21 insertions, 3 deletions
diff --git a/doc/font.n b/doc/font.n
index 104be90..8f12e00 100644
--- a/doc/font.n
+++ b/doc/font.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: font.n,v 1.4 2004/03/25 12:12:36 vincentdarley Exp $
+'\" RCS: @(#) $Id: font.n,v 1.5 2004/06/18 21:42:16 dkf Exp $
'\"
.so man.macros
.TH font n 8.0 Tk "Tk Built-In Commands"
@@ -258,7 +258,6 @@ font should be underlined. The default value for underline is \fBfalse\fR.
The value is a boolean flag that specifies whether a horizontal line should
be drawn through the middle of characters in this font. The default value
for overstrike is \fBfalse\fR.
-
.SH "PLATFORM-SPECIFIC ISSUES"
.LP
The following named system fonts are supported:
@@ -280,8 +279,27 @@ Macintosh:
\fBsystem application\fR
.DE
.RE
+.SH EXAMPLE
+Fill a text widget with lots of font demonstrators, one for every font
+family installed on your system:
+.CS
+pack [text .t -wrap none] -fill both -expand 1
+set count 0
+set tabwidth 0
+foreach family [lsort -dictionary [\fBfont\fR families]] {
+ .t tag configure f[incr count] -font [list $family 10]
+ .t insert end ${family}:\\t {} \\
+ "This is a simple sampler\\n" f$count
+ set w [\fBfont\fR measure [.t cget -font] ${family}:]
+ if {$w+5 > $tabwidth} {
+ set tabwidth [expr {$w+5}]
+ .t configure -tabs $tabwidth
+ }
+}
+.CE
+
.SH "SEE ALSO"
-options
+options(n)
.SH KEYWORDS
font