-
-
Notifications
You must be signed in to change notification settings - Fork 626
Fonts gone crazy after installing v2_018 on Jetbrains [Java renderer] #152
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
Thanks for reporting it. Can you give us your platform, the editor, and indicate whether you are using the ttf or otf builds? |
Sure, here you go
|
We will take a look into the initial issue that you reported. This was a direct upgrade from the v2.010 to the v2.018 release? |
Yes It was |
thanks! |
Did a direct update from v2.010 to v2.018 today too. System: Never had any rendering issues prior to v2.018. |
Can you be more specific? Are you seeing character changes like in the OP image? |
Seems to be some strange Windows + JB renderer-specific issue. Here is where I am in PyCharm 4.5 (old version) and the current PyCharm 5.0.2 release: PyCharm 4.5 PyCharm 5.0.2 My understanding is that PyCharm uses the same Java based text renderer. I modified the text size to 12 and have line spacing at 1.0. This does not seem to influence the display on OS X. Are either of you willing to submit an issue report on the JetBrains tracker to investigate this? I don't develop on a Windows platform and it will be difficult for me to work through the issue with them. I'd be happy to follow the thread, pitch in information from the standpoint of our fonts (including OpenType table settings if that is where this winds up existing) and implement any changes that they recommend if they are able to identify what is going on with the renderer in the Windows editors. |
Will take a look at a diff of our OpenType table data between the 2.010 and 2.018 versions this week as well. Perhaps this will lead to some useful information. If you are willing to take the time, would it be possible to check each of the release versions between 2.010 and 2.018 to determine where we introduced the problem? This might point us in the direction of an answer if it lies in the OpenType table settings. |
It seems to be a general issue with the Java font renderer - not specific to JetBrains IDEs. I wrote a quick test application using the generic Java Swing GUI system. It prints the text "Hello World" twice - on the left using Hack and on the right using the default monospaced font. Sourcecode: https://gist.github.com/fruel/1e4471b5474708f9c3e1 Maybe someone else can confirm that other Java-based application are affected too. Edit:
|
Tested the old versions with the test application from the comment above. The issue starts with v2.017. |
@fruel Thank you! I will take a look at our OpenType table changes between those versions. Are you aware of other text editors that use this renderer? |
Are the editors here being released with a bundled JDK? That seems to be the case on OS X. |
I tested a few other applications with v2.0.17: jEdit eclipse NetBeans 8.1 I think NetBeans and jEdit use the same GUI system whereas eclipse uses something different. (NetBeans and jEdit have similar look & feel and the font-selection dialogs are identical) Wikipedia confirms this:
|
@fruel Thank you very much for all of this information. This is extremely helpful. I will post some information about the differences in our OpenType tables between the identified versions this week. |
New discovery: I have multiple Java versions installed and only older ones are affected. When installing NetBeans it seems the installer changed the default Java runtime as Hack v2.018 is now working everywhere except in NetBeans. I tested this manually with the my test application from above: What Java version do you have on OSX? |
|
OK...this thing is getting really weird.... If I start my test application from the command line using 1.8u51 it does not work but IntelliJ claims to be running with 1.8u51 and it is working now: Edit: Of course I restarted all applications every time the Hack version changed Edit2: Ok...IntelliJ uses a bundled JRE - but why did Hack start to work after installing NetBeans...really weird |
Please reopen if this remains an issue for you. |
I'm not sure why did you close this issue, but this issue still exist with latest Webstorm |
@rahilwazir More than happy to continue to help here though I am not on Windows and cannot reproduce the issue on OS X versions of JetBrains editors. @fruel would you be willing to release that code that you used to render fonts with Java? This would be an extremely helpful tool for us and might help us locate the problematic JRE versions. Perhaps with this information, one of the two of you could submit an issue report on the JetBrains issue tracker so that we can explore this in more detail. |
You can find the source code for my demo application linked im my comment from Nov. 29. It's a basic java window. It still does not work for me in Android Studio but it works in PHPStorm - I'm not sure why or what version of java are affected as it behaved really weird. |
@chrissimpkins Yeah both approaches works, @yoyosan solution is other way around |
I will add this to the README and let you know when it is available. Thanks again. Odd problem. |
README updated with workaround for this issue. Users are still having the problem and the issue report remains open on the JetBrains tracker. Will continue to leave the issue open here for reference. |
@chrissimpkins The issue is closed now |
Alright, I will close this issue. Thanks for raising it @rahilwazir |
@fruel I know this issue is closed, but just for the sake of documentation: The issue that you suddenly had a C:\Windows\Fonts\Hack_Regular.ttf and some C:\Windows\Fonts\Hack_Regular**0**.ttf file is caused by the _Fonts applet. As soon as you open C:\Windows\Fonts (or use _Fonts_ from Control Panel) and then drag&drop a TTF file that is already there and/or locked, Windows will decide to copy the file as OrignalFileName**_0**.ttf. This doesn't make any sense, but that's what the coder of the Microsoft.Fonts applet did. |
@texhex Thank you for this information Michael. Appreciate the feedback. Odd that the duplicates that include different file paths lead to such problems... |
@texhex Nice to know, thanks for the inside |
Does anyone have this this issue after upgrading to webstorm 2016? |
@ragingnerd Well you are correct, I forgot to comment here. @chrissimpkins Can you look into this? PHPStorm 2016 causes this behavior again, even deleting old fonts before installing the new one. OS: Windows 10 x64, |
Can you both confirm that you do not have duplicate fonts as a result of the Fonts applet issue that @texhex reported in #152 (comment)? |
I think that might be the root cause. Font properties for the individual types show up as:
but all my system fonts have a suffix of _3 (Eg. arial_3.ttf) I've tried uninstalling the font, doing a clean reboot and reinstalling the fonts by clicking on them individually, then invalidating cache and restarting the ide. OS: Windows 8.1 x64 |
@ragingnerd any idea how those numbers are being applied? Is that install order or is Windows supplementing the file path with variant meta info through the number? This numbering system in the file paths (on clean installs) seems to be a new Windows issue. I wonder if we are dealing with a change in Windows rather than the JetBrains editors. |
@chrissimpkins no idea at this stage. I've tried reinstalling 2.019 and 2.018 .TTF fonts, the number of times / order I install the fonts in have no bearing on the numbers. I've also tried installing the Hack OTF fonts - no suffixes. |
@ragingnerd thank you for checking! do you see this problem with the otf builds? |
@chrissimpkins no problem! 2.019 .OTF Bold is fine, the other 3 have _0 appended to them - IDE renders everything in bold. |
@texhex I think we may need your expertise here. Any thoughts about these issues with the Windows installs? |
@chrissimpkins OK, I will do my very best. Let's see if this is enough :) @ragingnerd First, we should remove anything "Hack" related in order to have a clean state. Please first go to the Fonts applet (Right-click on Start menu -> Control Panel -> Appearance -> Fonts). Search for Hack and hit delete. Windows should then delete the fonts. If it says something about File XXX in use, can't delete don't worry. Next, restart the machine. Trust me, Windows requires this because of all the caching it does. Once the machine is back, fire up HKEY_LOCAL_MACHINE -> SOFTWARE -> Microsoft -> Windows NT -> CurrentVersion -> Fonts Inside this, locate the entries ("Name") starting with Hack (TrueType) etc. and delete them. Also, check if the column "Data" lists anywhere any Hack_XX.ttf entries. If so, delete them. Finally, below "Fonts" inside Restart the machine. Move back to the Fonts applet and check if there is still something "Hack" related listed. Finally, we do a check if really a files are gone. Open CMD.EXE and execute Restart the machine one final time. Recheck WebStorm. It shouldn't list Hack anymore and using any other font should be OK. If it still lists Hack, please let me know. In this case we might have the rare case of a damaged Font Cache 3.0 which requires stopping the "Windows FontCache" service and deleting the "FontCache3.0_.dat" file in _C:\Windows\ServiceProfiles\LocalService\AppData\Local*. Then try to install Hack again by drag&drop the TTF file to the fonts applet. And you know it already: Restart the machine after that before trying to use the font. That's all I can think of right now. HTH! P.S.: If you think the font handling of Windows is b0rken by design: I couldn't agree more :). |
@texhex Wow, that is a convoluted mess on Windows. It sounds like Windows doesn’t intend to have fonts updated very often. Thanks so much for all of this information. @rahilwazir @ragingnerd please let us know if the above works for you. |
@chrissimpkins Yes, it's a total mess. The main problem is that Windows has several "data stores" (Files, Registry, Cache) and no sanity check in place if this all makes sense. I would assume that single coder, that has the full backup from the Windows lead, could get all this sorted out in less than two weeks or so. But hey, it only took them two Windows version to bring the start menu back :-). |
@chrissimpkins Well that actually works 😄 Thanks @texhex once again, so weird shit going on |
@texhex 👍 !! |
@texhex @chrissimpkins All sorted, thanks for your help! Btw for anyone having the same problem, when I do a |
@ragingnerd Good to hear. Finally you can enjoy the most awesome font ever :-). Blunt self promotion: I have create a setup.exe for Hack (and some other fonts) that should make installation on a new machine rather easy. It takes also care about those Hack_0/1/2.ttf files and about the Font Cache service(s). You might want to give it a try for the next machine: OS Font Pack. Note: This setup is not approved by @chrissimpkins, but I hope some day it will. |
I will try to get the docs updated this week. Sorry for the delay and thanks again! |
@chrissimpkins No rush needed Chris, I just wanted to make sure that the setup is not "official". The message wasn't intend to push you to anything. Really. |
Fonts gone crazy after installing the
v2.018
but its working fine withv2.010
, I did restart Jetbrain IDE. Increasing/Decreasing font have still same effect.The text was updated successfully, but these errors were encountered: