summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-11-12 09:39:34 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-11-12 09:39:34 (GMT)
commita417a924de5d80940b31da2856b812f3ab10eead (patch)
tree5d1ebaf799cb613b6333b876d348cba63ea4211e
parentec7763d714155656593062079103d395f20faeed (diff)
downloadtk-a417a924de5d80940b31da2856b812f3ab10eead.zip
tk-a417a924de5d80940b31da2856b812f3ab10eead.tar.gz
tk-a417a924de5d80940b31da2856b812f3ab10eead.tar.bz2
Switch to a floating point approach in font-44.1
-rw-r--r--tests/font.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/font.test b/tests/font.test
index 45d8af6..d260dce 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -2344,12 +2344,12 @@ test font-44.1 {TkFontGetPixels: size < 0} -setup {
set oldscale [tk scaling]
} -body {
puts "oldscale: $oldscale"
- set oldsize [expr {round([font actual {times -12} -size] * $oldscale)}]
+ set oldsize [expr {-(-12.0 / $oldscale)}]
puts "font actual {times -12}: [font actual {times -12}]"
puts "oldsize: $oldsize"
tk scaling 0.5
puts "font actual {times -12}: [font actual {times -12}]"
- expr {round([font actual {times -12} -size] - $oldsize / 0.5) == 0}
+ expr {([font actual {times -12} -size] / $oldscale * 0.5 - $oldsize) < 0.001}
} -cleanup {
tk scaling $oldscale
} -result 1