summaryrefslogtreecommitdiffstats
path: root/library/ttk/fonts.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-10-24 12:59:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-10-24 12:59:29 (GMT)
commite45899dfe4a136045461e8d0a243333b8ea5772d (patch)
tree355358c10e10a1d3a4082cb6e6a24a379af08bd8 /library/ttk/fonts.tcl
parent1716dd0b177db2823c1a9db54804b2ff72749534 (diff)
downloadtk-e45899dfe4a136045461e8d0a243333b8ea5772d.zip
tk-e45899dfe4a136045461e8d0a243333b8ea5772d.tar.gz
tk-e45899dfe4a136045461e8d0a243333b8ea5772d.tar.bz2
merge updates from HEAD
Diffstat (limited to 'library/ttk/fonts.tcl')
-rw-r--r--library/ttk/fonts.tcl64
1 files changed, 26 insertions, 38 deletions
diff --git a/library/ttk/fonts.tcl b/library/ttk/fonts.tcl
index 8aa898d..83e19b5 100644
--- a/library/ttk/fonts.tcl
+++ b/library/ttk/fonts.tcl
@@ -1,5 +1,5 @@
#
-# $Id: fonts.tcl,v 1.4.2.1 2007/10/19 14:35:33 dgp Exp $
+# $Id: fonts.tcl,v 1.4.2.2 2007/10/24 12:59:35 dgp Exp $
#
# Font specifications.
#
@@ -7,23 +7,16 @@
# symbolic fonts based on the current platform:
#
# TkDefaultFont -- default for GUI items not otherwise specified
-# TkTextFont -- font for user text (entry, listbox, others). [not in #145]
-# TkHeadingFont -- headings (column headings, etc) [not in #145]
+# TkTextFont -- font for user text (entry, listbox, others)
+# TkFixedFont -- standard fixed width font
+# TkHeadingFont -- headings (column headings, etc)
# TkCaptionFont -- dialog captions (primary text in alert dialogs, etc.)
# TkTooltipFont -- font to use for tooltip windows
+# TkIconFont -- font to use for icon captions
+# TkMenuFont -- used to use for menu items
#
-# This is a temporary solution until TIP #145 is implemented.
-#
-# Symbolic fonts listed in TIP #145:
-#
-# TkDefaultFont -- the default for all GUI items not otherwise specified.
-# TkFixedFont -- standard fixed width font [not used by default]
-# TkMenuFont -- used for menu items [not used by default]
-# TkCaptionFont -- used for window and dialog caption bars [different meaning]
-# TkSmallCaptionFont -- captions on contained windows or tool dialogs [not used]
-# TkIconFont -- font in use for icon captions [not used by default]
-# TkTooltipFont -- font to use for tooltip windows
-#
+# In Tk 8.5, some of these fonts may be provided by the TIP#145 implementation
+# (On Windows and Mac OS X as of Oct 2007).
#
# +++ Platform notes:
#
@@ -51,13 +44,7 @@
# Note that the font for column headings (TkHeadingFont) is
# _smaller_ than the default font.
#
-# There's also a GetThemeFont() Appearance Manager API call
-# for looking up kThemeSystemFont dynamically.
-#
-# Mac classic:
-# Don't know, can't find *anything* on the Web about Mac pre-OSX.
-# Might have used Geneva. Doesn't matter, this platform
-# isn't supported anymore anyway.
+# There does not appear to be any recommendations for fixed-width fonts.
#
# X11:
# Need a way to tell if Xft is enabled or not.
@@ -75,7 +62,6 @@
namespace eval ttk {
-
set tip145 [catch {font create TkDefaultFont}]
catch {font create TkTextFont}
catch {font create TkHeadingFont}
@@ -86,6 +72,7 @@ catch {font create TkIconFont}
catch {font create TkMenuFont}
catch {font create TkSmallCaptionFont}
+if {!$tip145} {
variable F ;# miscellaneous platform-specific font parameters
switch -- [tk windowingsystem] {
win32 {
@@ -105,25 +92,25 @@ switch -- [tk windowingsystem] {
}
set F(size) 8
- if {!$tip145} {
- font configure TkDefaultFont -family $F(family) -size $F(size)
- font configure TkTextFont -family $F(family) -size $F(size)
- font configure TkHeadingFont -family $F(family) -size $F(size)
- font configure TkCaptionFont -family $F(family) -size $F(size) \
- -weight bold
- font configure TkTooltipFont -family $F(family) -size $F(size)
- font configure TkFixedFont -family Courier -size 10
- font configure TkIconFont -family $F(family) -size $F(size)
- font configure TkMenuFont -family $F(family) -size $F(size)
- font configure TkSmallCaptionFont -family $F(family) -size $F(size)
- }
+ font configure TkDefaultFont -family $F(family) -size $F(size)
+ font configure TkTextFont -family $F(family) -size $F(size)
+ font configure TkHeadingFont -family $F(family) -size $F(size)
+ font configure TkCaptionFont -family $F(family) -size $F(size) \
+ -weight bold
+ font configure TkTooltipFont -family $F(family) -size $F(size)
+ font configure TkFixedFont -family Courier -size 10
+ font configure TkIconFont -family $F(family) -size $F(size)
+ font configure TkMenuFont -family $F(family) -size $F(size)
+ font configure TkSmallCaptionFont -family $F(family) -size $F(size)
}
aqua {
set F(family) "Lucida Grande"
set F(fixed) "Monaco"
+ set F(menusize) 14
set F(size) 13
set F(viewsize) 12
set F(smallsize) 11
+ set F(labelsize) 10
set F(fixedsize) 9
font configure TkDefaultFont -family $F(family) -size $F(size)
@@ -131,11 +118,11 @@ switch -- [tk windowingsystem] {
font configure TkHeadingFont -family $F(family) -size $F(smallsize)
font configure TkCaptionFont -family $F(family) -size $F(size) \
-weight bold
- font configure TkTooltipFont -family $F(family) -size $F(viewsize)
+ font configure TkTooltipFont -family $F(family) -size $F(smallsize)
font configure TkFixedFont -family $F(fixed) -size $F(fixedsize)
font configure TkIconFont -family $F(family) -size $F(size)
- font configure TkMenuFont -family $F(family) -size $F(size)
- font configure TkSmallCaptionFont -family $F(family) -size $F(fixedsize)
+ font configure TkMenuFont -family $F(family) -size $F(menusize)
+ font configure TkSmallCaptionFont -family $F(family) -size $F(labelsize)
}
default -
x11 {
@@ -165,6 +152,7 @@ switch -- [tk windowingsystem] {
}
}
unset -nocomplain F
+}
}