summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-11-01 21:46:32 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-11-01 21:46:32 (GMT)
commit02d5b4ce51b3369a40200179d9878ca1d06e71fc (patch)
treec71dded66f2a7d65a89d7a5743cd57c7b984601e
parentc3e1b7407cebd1b2d0e8d3ec2271dd4ccb6faf99 (diff)
downloadtk-02d5b4ce51b3369a40200179d9878ca1d06e71fc.zip
tk-02d5b4ce51b3369a40200179d9878ca1d06e71fc.tar.gz
tk-02d5b4ce51b3369a40200179d9878ca1d06e71fc.tar.bz2
Enhance previous commit: Without Xft also, check availability of the required font.
-rw-r--r--tests/unixFont.test10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/unixFont.test b/tests/unixFont.test
index e7b96aa..f593fa9 100644
--- a/tests/unixFont.test
+++ b/tests/unixFont.test
@@ -33,16 +33,16 @@ foreach {constraint font} {
hasCourierNew "courier new"
hasTimesNew "times new roman"
} {
+ testConstraint $constraint 0
if {([tk windowingsystem] eq "x11") && [llength $fontsystemcmd]} {
if {$withXft} {
- # check whether $font is available
- testConstraint $constraint 0
if {[exec $fontsystemcmd $font family] ne ""} {
testConstraint $constraint 1
}
} else {
- # $font is supposed to be available by default
- testConstraint $constraint 1
+ if {![catch {eval exec $fontsystemcmd [list *-$font-*]} res]} {
+ testConstraint $constraint 1
+ }
if {![catch {eval exec $fontsystemcmd [list *-$font-*]} res]
&& ![string match *unmatched* $res]} {
# Newer Unix systems have more default fonts installed,
@@ -51,8 +51,6 @@ foreach {constraint font} {
testConstraint $constraint 0
}
}
- } else {
- testConstraint $constraint 0
}
}