-
-
Notifications
You must be signed in to change notification settings - Fork 615
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
Hack font shown as "garbage" in IntelliJ IDEA #362
Comments
Can you please check, with total commander (or any other tool just NOT windows explorer), what HACK related files you have in the windows/font dir ? I had a similar issue a while ago, and it was related due to having different versions of hack in the font dir - even though windows explorer will pretend there is only one. See #345 (comment) |
This definitely appears to be the dreaded Windows caching issue with JetBrains editors/Java renderer. Agree with @jorgheymans comments. We will need the information that he requested to troubleshoot this. cc: @texhex |
At least for the linegap and the the regular font with the text "Regular" (that Windows does not like), this should be fixed in the windows installer. If there are really left overs from Hack inside C:\Windows\Fonts of @tasso85 that should be deleted, we might have an issue that Inno Setup can not delete the file (because they are in use) but doesn't generate an error. |
After the problem, I went back and re-installed latest version 2 of the font. I have checked with both WLS shell and WinSCP, and it appears that in my C:/Windows/Fonts folder there is an extra Hack-Bold_0.ttf file |
Thanks, please try the following: Use the Hack-Windows-Installer (latest), execute it, restart your computer and execute it AGAIN. After the restart, does this extra file still exist? If not, does IntelliJ now work as expected? This dual execution is needed (as of now) to get rid of any locked font files, as the current installer can not delete locked files. If the dual execution works, it means we need to find a way to delete locked files on the first try. |
After performing the double installation as suggested, it didn't ask to reboot after the second one, and I checked Notepad++, NetBeans and IntelliJ IDEA, all render the font correctly. If I may ask, couldn't the double installation just be replaced with a single one right after boot? |
Thanks @tasso85, good to hear. This means that you have proven the assumption of @jorgheymans and we finally found the cause of the Hack glyph display issues for Java! Thanks to you both! TL;DR: I will try to update the installer so everything can be done in one step. For documentation, this is what I believe happens here:
And there was me, thinking that I already knew all font installations issues on Windows. |
@texhex nice summary 👍 Maybe then your installer could drop a little thingy "somewhere" that is "somehow" executed automatically after the restart, deleting the extra font files ? |
@jorgheymans That somewhere and somehow would be MoveFileEx with the parameter MOVEFILE_DELAY_UNTIL_REBOOT ; ). |
❤️
Any idea how that file is getting there? Why is Win creating a new font path at some stage during installs/reinstalls? Something that needs to be reported to Microsoft? This seems like unexpected incorrect OS behavior, no? |
Just to have all information in one place:
The new installer is available from Releases. |
Well, this file is clearly created by the FONTS applet again because the original Hack-Bold.ttf was locked. The question here is: Is it a bug? Given that Windows updated the registry to reflect that "Hack Bold" is now found inside the file Hack-Bold_0.ttf and all Windows programs should query the registry for font data, this makes the original Hack-Bold.ttf "just" a small Zombie file without purpose. The problem begins the moment as Java queries the \Fonts folder, bypassing the registry and ending up with two files for the same variant which in turn causes the display problems. I doubt Microsoft will acknowledge this is as a bug, because from their perspective Java is not doing it the way it should work. I'm fully with you that Microsoft should rewrite the entire Font handling from scratch, but given how many broken components they have in Windows 10 (starting from the "Start Menu" which is nearly FUBAR), I doubt they will do anything about this. |
Thanks @texhex and @jorgheymans. Any suggestions for documentation changes here for future users who see this problem? Are we properly linked to the docs on the Win installer side so that this is evident and there is a simple path to the information that you provide @texhex? |
@chrissimpkins it's an exceptional case, not sure if you need to link it in the documentation more prominently. |
@jorgheymans OK thanks. We good to close this now? |
@chrissimpkins It's documented in https://github.com/source-foundry/Hack-windows-installer/blob/master/FontInstallationIssues.md and as this is an edge case as @jorgheymans said, I think that's enough documentation for now. I'm fine with closing this issue. |
thanks @texhex! fantastic work on this. it's great to have your expertise here! |
Hi,
I have just updated the font on my Windows 10 machine, and now IntelliJ Idea shows a really weird behaviour.
variant(s) of the Hack fonts that are affected (Regular, Bold, Italic, BoldItalic): windows installer on the official site, the IDE uses "regular" version I think
Other IDE, for example netbeans, seem to have no issue with the font.
The text was updated successfully, but these errors were encountered: