#173 Kdiff3 text layout seems broken on OSX

v1.0_(example)
closed
Joachim Eibl
None
5
2014-08-07
2012-08-15
Patrick Mézard
No

I first saw this when upgrading from the last shipped OSX binary to macports kdiff3 (probably 0.9.96). I reproduced it by building kdiff3, apparently against macports qt4-mac @4.8.2. I am attaching two pairs of screenshot of a diff run on the README between 0.9.96 and 0.9.97. Each pair has a regular display and one with some selected text.
- kdiff3-diff1 exhibits display problems, mostly overlapping characters on regular text. The effect disappears on selected text.
- kdiff3-diff2
exhibits the same kind of artifacts but selecting turns overlapping characters into clipped characters.

There is a similar effect in the merge panel which makes editing almost unusable: there is clearly a problem with font size calculation, clicking on one character would move the caret before another, plus the previous display problems.

I might find time on my side to investigate this but I know nothing of QT, if you want me to test things do not hesitate, and if you have pointers to enter the code...

--
Patrick

Discussion

  • kdiff3-diff1.png

     
    Attachments
  •  
    Attachments
  • Joachim Eibl
    Joachim Eibl
    2012-08-15

    Hi Patrick,

    This seems to be the same as on Ubuntu 12.04
    https://bugs.launchpad.net/bugs/999925

    Workarounds:
    Since this problem wasn't there previously I suppose it has to do with the new Qt version. Please try 4.7.x or 4.6.x.
    You might also try a bitmap font.

    Joachim

     
  • Joachim Eibl
    Joachim Eibl
    2012-09-12

    Hi Patrick,

    Please give the latest version in the kdiff3-git-repository a try.
    I now use QTextLayout for rendering which will also allow variable width fonts.
    Please write if it works or if there are other issues.

    Joachim

     
  • Hello Joachim,

    Sorry for the delay and thank you for the awesome work. I have quickly tested the selection on a two-panel diff as well as a simple conflict resolution with a 3-ways merge and it seems to work quite well. You can definitely close the issue for now, I will open new ones if I ever encounter new problems.

    Just one note related to the git repository: when I read your previous message, my first thought was to update my local mercurial repository from the former subversion one, but it retrieved nothing. Looking at the subversion repository, it seems the last commit was:


    r180 | joachim99 | 2012-08-13 16:02:06 +0200 (Mon, 13 Aug 2012) | 1 line

    Fix for 32 bit installations

    So the git and the svn repositories are not synchronized unlike what I imagined. You should probably get rid of the subversion one at that point to avoid confusion. Just my 2 cents.

    --
    Patrick

     
  • Ian Brandt
    Ian Brandt
    2013-11-11

    Greetings Joachim,

    Thanks for all your efforts maintaining kdiff3. Any chance for a new release with this fix? The bug makes kdiff3 very hard to use on Mac.

    Ian

     
  • Joachim Eibl
    Joachim Eibl
    2014-08-07

    • status: open --> closed
    • Group: --> v1.0_(example)
     
  • Joachim Eibl
    Joachim Eibl
    2014-08-07

    Should work in 0.9.98