Linux Ubuntu, Suse, Elementary - Idea, Webstorm Monaco font not visible

Answered

Why Idea 2016.3.4 cannot see Monaco Linux font? All other programs (e.g. sublime text) can see it.
Idea can see all other monospace fonts I have in my folder.

1
7 comments

Can other Java Swing IDEs see it as monospaced? Try NetBeans and JEdit.

0
Avatar
Permanently deleted user

Having the same problem in IntelliJ IDEA 2017.1

Environment:

 

IntelliJ IDEA (Community Edition) 2017.1.1 EAP
Build #IC-171.4073.17, built on March 30, 2017
JRE: 1.8.0_112-release-736-b16 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.8.0-46-generic

 

0

The same question to you, can other Java Swing apps recognize this font as monospaced?

0
Avatar
Permanently deleted user

Yeah, good question. So I first tried the following Java snippet to test. I currently have `Hasklig` as my editor font in IDEA:

 

public class FontTest {
public static void main(String[] args) {
java.awt.GraphicsEnvironment ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();
String[] allFontNames = ge.getAvailableFontFamilyNames();
System.out.println(
"Monaco: "
+ java.util.Arrays.stream(allFontNames)
.anyMatch(name -> name.contains("Monaco")));
System.out.println(
"Hasklig: "
+ java.util.Arrays.stream(allFontNames)
.anyMatch(name -> name.contains("Hasklig")));
}
}

 

With output

 

<pre>

Monaco: false

Hasklig: true

</pre>

 

Then I tried jEdit which is a Java Swing editor to confirm. In jEdit I could not either choose `Monaco` as it was not listed.

 

Searching further shows that `Monaco` font on Linux **must** be TTF and in Unicode; otherwise it does not work.

I confirm that I have now the correct version of the font which works in all the above.

 

0

Thanks! It may also help others if you share the link where to get the proper version of the font.

0
Avatar
Permanently deleted user

This discussion page helped with the link at the end of the page.

1
Avatar
Permanently deleted user

Great - IT WORKS!!!

You have to install monaco from this link :   http://www.gringod.com/wp-upload/MONACO.TTF , refresh font cache, reopen Intellij and thats it. 

0

Please sign in to leave a comment.