If you have problems with the font Inconsolata on linux-based systems with JetBrains IDEs – and possibly with other Java-based apps – try the following. I will give this example in terms of Ubuntu 14.04 and PyCharm but it should work for some other similar situations.
1. Close PyCharm, or to be extra careful use File > Invalide Caches and then close PyCharm without restarting.
2. Remove all copies of Inconsolata from your system:
sudo find / -depth -iname "inconsolata*"
- test first to check what will be removed:
sudo find / -iname "inconsolata*" -delete
- then if you agree with what comes up, do the removal:
... or else remove the files that you choose by hand.
2b. It may be a good idea to open PyCharm at this point and use File > Invalidate Caches just to make sure it understands Inconsolata is gone.
3. Do not install inconsolata from your system's package repository, or from the many internet links to the designer's primary copy of it. That version is the one with display problems in PyCharm. Instead, go to Google Web Fonts and download their ttf version:http://www.google.com/fonts/specimen/Inconsolata
- It will be in a zip archive; after downloading open the archive, open the font (only the regular version, do not install the bold version – it will confuse PyCharm) with the system font viewer, which should be the default double-click action for the file, and then click the Install button from the viewer.
4. Force your system to rebuild its font cache.sudo fc-cache -frv
- the 'r' option could be left out if you only want to rescan and not completely rebuild the cache.
5. Log out and back in, or reboot.
6. Open PyCharm and go to Settings > Editor > Colors & Fonts > Font. Uncheck "show only monospaced fonts". This is the only remaining problem but at least it doesn't really cause any issue. Now Inconsolata will show up in the list and you can choose it.
If you have any other problems getting new fonts to work in Jetbrains IDEs on Ubuntu, experiment with the program "font-manager" which can be installed using sudo apt-get install font-manager
. It can do some re-sorting of fonts that seems to help PyCharm and other IDEs find and use them.
One other note is that fonts show up in several different locations on Ubuntu systems and they do not always install themselves in the expected or even the correct one from the several possibilities. System fonts should be in /usr/share/fonts, but sometimes end up in /usr/local/share/fonts (not a wrong choice, really, but just be aware that either one can work). User fonts sometimes end up in ~/.fonts, but some of them end up in ~/.local/share/fonts.
One of the things font-manager can do for you is correctly sort which fonts are system and which are user-installed and put the user ones in the right directory. Without doing so, a great many user-installed fonts end up in the system directory for some reason, which just seems unhelpful.