|
From: SourceForge.net <no...@so...> - 2009-08-28 00:53:51
|
Patches item #2844750, was opened at 2009-08-26 06:46 Message generated for change (Comment added) made by cyzsuraj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=2844750&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: texteditor Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Suraj Kurapati (cyzsuraj) Assigned to: Nobody/Anonymous (nobody) Summary: line height correction (disappearing underscores) Initial Comment: Attached is a patch (against SVN r16059) which solves problem of underscores disappearing when the cursor is moved up and down the lines of the TextArea with the "DejaVu Sans Mono" at 15pt in jEdit from SVN trunk (r16059) under openjdk6-1.5-2-i686. The root cause was the underscore in this particular font descends below lineHeight and appears on the first pixel of the next line. So when the next line is drawn, the underscore of the current line is painted-over and it disappears. The solution used in the patch is to always draw one extra line above the first line being repainted, so that any underscores in the extra above line are preserved during the repaint. Thanks for your consideration. ---------------------------------------------------------------------- >Comment By: Suraj Kurapati (cyzsuraj) Date: 2009-08-28 00:53 Message: I noticed that the problem of underscores not being rendered also occurs within the drop-down menu that appears when the "complete word" action is issued. Is there a global place where the lineHeight is calculated for a font? If we add +1 pixels to that result, then this problem will be solved everywhere without having to do things like redraw lines (as my patch does). Thanks. ---------------------------------------------------------------------- Comment By: Suraj Kurapati (cyzsuraj) Date: 2009-08-26 23:22 Message: Actually, I don't think the problem is entirely fixed. I was using this patch some more last night and noticed that after editor actions such as "complete word" are performed, underscores on the current line are obscured once again. It seems the current line is being drawn LAST (the lines below & above it are being drawn before the current line). Any suggestions? We should definitely test out this patch before submitting into SVN.... Thanks for your consideration. ---------------------------------------------------------------------- Comment By: daniel hahler (blueyed) Date: 2009-08-26 17:41 Message: I confirm this bug, using DejaVu Sans 12 Plain. Also the patch fixes it for me and I intend to commit it, if nobody speaks up against it. ---------------------------------------------------------------------- Comment By: Suraj Kurapati (cyzsuraj) Date: 2009-08-26 06:52 Message: Here two are screencasts showing before & after the patch: http://snk.tuxfamily.org/tmp/before.gif http://snk.tuxfamily.org/tmp/after.gif ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300588&aid=2844750&group_id=588 |