From 0d2e82859b96c50bc0575f299f97117c71b3d9a0 Mon Sep 17 00:00:00 2001 From: culler Date: Tue, 28 May 2019 13:41:28 +0000 Subject: When running textDisp.test on Aqua use Courier as the fixed font since Courier New has different metrics. --- tests/textDisp.test | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/textDisp.test b/tests/textDisp.test index b74fc4a..94e0184 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -41,7 +41,15 @@ catch {destroy .f .t} frame .f -width 100 -height 20 pack .f -side left -set fixedFont {"Courier New" -12} +# On macOS the font "Courier New" has different metrics than "Courier", +# and this causes tests 20.1 - 20.5 to fail. So we use "Courier" as the +# fixed font for testing on Aqua. + +if {[tk windowingsystem] eq "aqua"} { + set fixedFont {Courier -12} +} else { + set fixedFont {"Courier New" -12} +} # 15 on XP, 13 on Solaris 8 set fixedHeight [font metrics $fixedFont -linespace] # 7 on all platforms -- cgit v0.12