Tk Source Code

Check-in [b441746a]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix [dccd82bdc7]: ttk fonts are absolute on x11, which is very undesirable for hidpi displays
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bug-dccd82bdc7 | tip-564
Files: files | file ages | folders
SHA3-256: b441746a6000540accd816f06ef10445960849337416dd182024e412405d1562
User & Date: fvogel 2020-01-26 20:13:36
References
2020-01-26
20:27 Ticket [dccd82bd] ttk fonts are absolute which is very undesirable for hidpi displays status still Open with 5 other changes artifact: 73ba2ec9 user: fvogel
Context
2020-02-14
11:42
Merge trunk Closed-Leaf check-in: a310caa1 user: jan.nijtmans tags: bug-dccd82bdc7, tip-564
2020-01-26
20:13
Fix [dccd82bdc7]: ttk fonts are absolute on x11, which is very undesirable for hidpi displays check-in: b441746a user: fvogel tags: bug-dccd82bdc7, tip-564
2020-01-25
17:13
Let bind-34.3 be robust against Linux KDE hot spots on screen corners. check-in: 4bcebd2c user: fvogel tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/ttk/fonts.tcl.

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
...
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#	For now, assume patch #971980 applied.
#
#	"Classic" look used Helvetica bold for everything except
#	for entry widgets, which use Helvetica medium.
#	Most other toolkits use medium weight for all UI elements,
#	which is what we do now.
#
#	Font size specified in pixels on X11, not points.
#	This is Theoretically Wrong, but in practice works better; using
#	points leads to huge inconsistencies across different servers.
#

namespace eval ttk {

variable tip145 [catch {font create TkDefaultFont}]
catch {font create TkTextFont}
catch {font create TkHeadingFont}
catch {font create TkCaptionFont}
................................................................................
	if {![catch {tk::pkgconfig get fontsystem} F(fs)] && $F(fs) eq "xft"} {
	    set F(family) "sans-serif"
	    set F(fixed)  "monospace"
	} else {
	    set F(family) "Helvetica"
	    set F(fixed)  "courier"
	}
	set F(size) -12
	set F(ttsize) -10
	set F(capsize) -14
	set F(fixedsize) -12

	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) \
			-weight bold
	font configure TkCaptionFont -family $F(family) -size $F(capsize) \
			-weight bold






<
<
<
<







 







|
|
|
|







49
50
51
52
53
54
55




56
57
58
59
60
61
62
...
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#	For now, assume patch #971980 applied.
#
#	"Classic" look used Helvetica bold for everything except
#	for entry widgets, which use Helvetica medium.
#	Most other toolkits use medium weight for all UI elements,
#	which is what we do now.
#





namespace eval ttk {

variable tip145 [catch {font create TkDefaultFont}]
catch {font create TkTextFont}
catch {font create TkHeadingFont}
catch {font create TkCaptionFont}
................................................................................
	if {![catch {tk::pkgconfig get fontsystem} F(fs)] && $F(fs) eq "xft"} {
	    set F(family) "sans-serif"
	    set F(fixed)  "monospace"
	} else {
	    set F(family) "Helvetica"
	    set F(fixed)  "courier"
	}
	set F(size) 10
	set F(ttsize) 9
	set F(capsize) 12
	set F(fixedsize) 10

	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) \
			-weight bold
	font configure TkCaptionFont -family $F(family) -size $F(capsize) \
			-weight bold