Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2553 test failures

obsolete: 8.6a4
open
5
2009-07-13
2008-11-22
Don Porter
No

not certain, but I think these
are new:

==== canvText-18.1 bug fix 2525, find enclosed on text with newlines FAILED
==== Contents of test case:

pack [canvas .c]
.c create text 100 100 -text Hello\n -anchor nw
set bbox [.c bbox 1]
set x2 [lindex $bbox 2]
set y2 [lindex $bbox 3]
incr y2
update
.c find enclosed 99 99 [expr $x2 + 1] [expr $y2 + 1]

---- Result was:

---- Result should have been (exact matching):
1
==== canvText-18.1 FAILED

==== canvText-20.1 angled text bounding box FAILED
==== Contents of test case:

.c create text 2 2 -tag t -anchor center -text 0 -font {Helvetica 24}
set bb0 [.c bbox t]
.c itemconf t -angle 90
set bb1 [.c bbox t]
.c itemconf t -angle 180
set bb2 [.c bbox t]
.c itemconf t -angle 270
set bb3 [.c bbox t]
list [expr {$bb0 eq $bb2 ? "ok" : "$bb0,$bb2"}] [expr {$bb1 eq $bb3 ? "ok" : "$bb1,$bb3"}] [expr {$bb0 eq [transpose $bb1] ? "ok" : "$bb0,$bb1"}]
---- Result was:
{-7 -22 12 27,-8 -23 11 26} {-22 -8 27 11,-23 -7 26 12} {-7 -22 12 27,-22 -8 27 11}
---- Result should have been (exact matching):
ok ok ok
==== canvText-20.1 FAILED

Discussion

  • First one is an off-by-one error on test "left>=x2" at line 2915 of tkFont.c for the special layout chunk of size zero:

    if ((right < x1) || (left >= x2)

    Here left==0 *and* x2 too (by construction of such chunks).
    Maybe zeroChunkPtr->x2 should be -1. Alternatively, maybe checks on X axis should be skipped for those chunks (ie when numDisplayChars==-1).

    Donal ?

     
  • Hmm, ->x2 should be 1 not -1 for the trick to work.
    Anyway, the alternative remains.

     
    • assigned_to: dkf --> ferrieux
     
  • I don't thoroughly understand what your proposed solution is (sorry!) so I'm going to let you have a go at it...

     
  • Oh gosh this slipped completely out of my cache :-}
    Allow for a short pagein delay...

     
  • Hmm, the change I committed solves the problem but in too brutal a fashion. It now collapses Hello\n to the same vertical size as Hello (ie half) for the enclosure computation. Reconsidering it.

    Braindump: those zero-width chunks should not be ignored altogether, but their semantics is tricky. If they exactly coincide with one edge of the enclosure-check rectangle, should they be considered inside, outside, or "don't weigh on collective decision" ?

     
  • Don Porter
    Don Porter
    2013-04-29

    see 3611174