summaryrefslogtreecommitdiffstats
path: root/tests/font.test
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2023-11-07 20:48:50 (GMT)
committerfvogel <fvogelnew1@free.fr>2023-11-07 20:48:50 (GMT)
commite7086b7d4c5351378c88424e43a74aa1b3db2916 (patch)
tree5e73a0089cd07bbe7de3876ad02379b39cd3546c /tests/font.test
parent8ce8c470662389474feee053d57e13b0cc8efafa (diff)
downloadtk-e7086b7d4c5351378c88424e43a74aa1b3db2916.zip
tk-e7086b7d4c5351378c88424e43a74aa1b3db2916.tar.gz
tk-e7086b7d4c5351378c88424e43a74aa1b3db2916.tar.bz2
Pixel sizes in font-44.1 must match as integers, therefore round computations.
Diffstat (limited to 'tests/font.test')
-rw-r--r--tests/font.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/font.test b/tests/font.test
index 80a0420..5884334 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -2342,9 +2342,9 @@ test font-43.1 {FieldSpecified procedure: specified vs. non-specified} -body {
test font-44.1 {TkFontGetPixels: size < 0} -setup {
set oldscale [tk scaling]
} -body {
- set oldsize [expr {[font actual {times -12} -size] * $oldscale}]
+ set oldsize [expr {round([font actual {times -12} -size] * $oldscale)}]
tk scaling 0.5
- expr {[font actual {times -12} -size] == $oldsize / 0.5}
+ expr {round([font actual {times -12} -size] - $oldsize / 0.5) == 0}
} -cleanup {
tk scaling $oldscale
} -result 1