-
-
Notifications
You must be signed in to change notification settings - Fork 624
Underscores disappearing in IDEA IDEs (Hack-v2_013-ttf) #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This appears to be related to the issue in #45 (and I think that there is at least one other issue report of a similar problem). Can you also verify whether this is a text size dependent phenomenon? With the lowercase g strokes in #45, it only occurs at certain text sizes. My thought is that this has something to do with the way that these editors are interpreting the vertical metrics of the fonts for the redraws (as you noted above). |
Increasing the text size seems to yield no improvements, however, surprisingly, decreasing the text size to 10pt saw underscores rendered on the correct line, thus solving the issue. Perhaps an issue may need to be filed with the JetBrains team? |
@Tbrisbane strange. OK, looking into it. |
The position of the underscore is too low in the source and it is off center. I will correct these and plan for this change to be in the next release. As an aside, others have had issues with the width with some renderers. Does it appear too thin on your system? |
@chrissimpkins The width looks fine to me. :) With regards to your planned fix for underscores - note that lower-case 'p' characters also lose their bottom-most pixels as mentioned by @Huddo121. I suspect the same will be true of any character with a low tail (lower-case 'y' would also be a good example), so if this isn't in fact a problem with IDEA's font handling, you may be looking at a 1px upwards bump for all glyphs in order to maintain consistency. |
I have been tinkering with the vertical metrics and am looking at metrics in other fonts. I suspect that this will lead to a fix but it is likely going to require iterations through these various editors and the patterns that you are using to make sure that we have it right. @manuel-uberti I definitely agree. That is a problem. Hope to have the first new build out this weekend so that we can see if it helps. |
Excellent. Happy to work with you to resolve this! :) |
New test build v2.014 (ttf only) is now available and I hope that it addresses the issues that you reported here. The underscore centering, size, and vertical alignment were updated. The vertical metrics of the fonts were updated. The files are available in #111. Please let me know how they work and what your thoughts are on the new, tighter vertical metrics as well as the new underscore characters. |
@chrissimpkins thanks, I'll try it asap. |
From the #111, comment by @Tbrisbane re: changes in the v2.014 ttf file build
I scanned the above posts and don't see that we addressed your platform and the version of the PyCharm and IntelliJ editors. Mind posting this information and letting me know if they are current builds vs. development/prelease builds? Any chance that this is a font caching issue and a reboot takes care of it in PyCharm? |
@manuel-uberti 👍 great! |
@manuel-uberti looks like the dash and colon aren't aligned for you. Someone reported this issue in the context of this combo |
@manuel-uberti This is in #66. Probably more appropriate to comment over there as it is a separate issue. |
@chrissimpkins Good point.
No chance of font caching issues, since the updated build resolves the issues with underscores in PyCharm (just not the tails of characters). To be safe, I both rebooted and cleared the Windows Font cache, to no avail. Some additional info though - In PyCharm, changing the font size yields the following results:
|
@Tbrisbane I was under the impression these JetBrains editors were using the same Java font renderer. Do you happen to have different line spacing settings in the two editors or different syntax highlighters that might be doing something different with the text display between the two editors? |
@chrissimpkins I too was under this impression. Same font size, same line-spacing. I know they syntax-highlight in slightly different ways (due to the different languages), but that doesn't affect the size in any way I can see. I'll take another look through the settings in case I just happened to miss something, but this is very strange. |
can you show me a screenshot of what you are seeing in PyCharm? I will try it in PyCharm on OS X and compare. |
Here is what I am seeing on OS X 10.10.5 in PyCharm Professional 4.5.4: Bottom is a highlighted line. Top is not. I am not seeing any overlap between the line highlighting and the tails of characters in the line above. The highlighted area seems to extend too high on your platform and is eliminating the render of the tails on the glyphs on the line above. Do you happen to see this in any non-JetBrains editors? |
Very strange. I've tried both Sublime Text 3 and even Notepad - neither exhibit this problem. I'm currently researching this issue to see if it's part of a wider-known problem. |
I submitted the issue to JetBrains. Here is the link: |
@skewty thanks! will keep an eye on it |
@skewty Thanks also. :) I added a bit of info to it in case they miss it here. @chrissimpkins I've been unable to find a known cause for this, myself. Given that the font works perfectly in Sublime and IntelliJ, I'm definitely of the opinion it's a PyCharm specific issue. Hopefully we'll see some input from JetBrains on it, but either way, thanks for your efforts thus far! :) |
@Tbrisbane it's my pleasure. Will be interesting to see what JetBrains has to say. We've encountered a number of issues in their editors that don't seem to happen in other editors. I would like to hear more about the Java based renderer that they are using. |
The issue remains under discussion on the JetBrains issue tracker. Still unresolved at this point. See @skewty comment above for link. |
@skewty & @Tbrisbane any progress on this issue over on the JetBrains side? |
@chrissimpkins None as of yet, however at this stage they don't require any additional information from us. |
@Tbrisbane thanks much. Haven't seen any information in that thread that points to the cause. |
@chrissimpkins This appears to be fixed in the v2.015 build, and JetBrains have closed the issue on their end for that reason. I think we can resolve this! :D |
@Tbrisbane thank you! |
I've noticed that within IDEA IDEs (I've noticed this on both IntelliJ and PyCharm so far), underscores seem to be disappearing in what appears to be an issue related to how IDEA handles redraw regions for the caret's current line.
Note in the following screenshot how the caret's current line is highlighted, and the underscores are visible:

Hack is designed such that underscores appear on the top-most pixels of the next line down. When the caret is moved down to the next line, the line highlighting follows it, and the underscores disappear:

What I suspect is happening is that IDEA is redrawing the current line after the caret moves down, (firstly the background to remove the line highlighting, then the text), but is NOT redrawing the line above. The result is that due to the underscores of the above line being within the redraw region of the current (highlighted) line, they get removed when the current line's background is redrawn to remove its highlighting.
The text was updated successfully, but these errors were encountered: