diff options
author | fvogel <fvogelnew1@free.fr> | 2016-12-01 19:27:08 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-12-01 19:27:08 (GMT) |
commit | 21dffd4fd384a0f4ff5ba4bd6266d2c7584c4738 (patch) | |
tree | 5356d997252077f481ff48f2f29a7104daf904cb | |
parent | f6ae02081a36dad1e26012e93672927e885ed267 (diff) | |
download | tk-21dffd4fd384a0f4ff5ba4bd6266d2c7584c4738.zip tk-21dffd4fd384a0f4ff5ba4bd6266d2c7584c4738.tar.gz tk-21dffd4fd384a0f4ff5ba4bd6266d2c7584c4738.tar.bz2 |
Also the fact that the actually used fonts must be fixed-width needs to be checked when assessing the value of the haveFontSizes constraint
-rw-r--r-- | tests/textTag.test | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/textTag.test b/tests/textTag.test index a2b2d73..6489c3a 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -12,16 +12,18 @@ eval tcltest::configure $argv tcltest::loadTestedCommands set textWidgetFont {Courier 12} -set bigFont {Helvetica 24} +set bigFont {Courier 24} -# what is needed is a specific font *size* because in some tests (that -# will be constrained by haveFontSizes), a tag applying the $bigFont -# will be set to some characters, which action has the effect of -# changing what character is under the mouse pointer, which is the -# purpose of the tests +# what is needed is a font that is both fixed-width and featuring a +# specific size because in some tests (that will be constrained by +# haveFontSizes), a tag applying the $bigFont will be set to some +# characters, which action has the effect of changing what character +# is under the mouse pointer, which is the purpose of the tests testConstraint haveFontSizes [expr { - [font actual $textWidgetFont -size] == 12 && - [font actual $bigFont -size] == 24 } + [font metrics $textWidgetFont -fixed] && + [font actual $textWidgetFont -size] == 12 && + [font metrics $bigFont -fixed] && + [font actual $bigFont -size] == 24 } ] destroy .t |