Enforcing system fontconfig in intellij

Answered

This question might not be specific to arch, but I'm currently running intellij on arch and have the following system fontconfig:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="embolden" mode="assign">
<bool>true</bool>
</edit>
</match>
</fontconfig>

I have set all my fonts to be more "Weightier" by using the embolden property. I've found this works very well in applications like sublime text and any native apps. See below for how sublime text renders the font with more weight.

https://i.stack.imgur.com/6Hhly.png

However, intellij fails to render the font in the same manner (using the same font). See below:


https://i.stack.imgur.com/aPKfv.png

Any idea on how I can get intellij to pick up the system fonts config? I've tried copying the config to the jdk fonts folder as mentioned here : https://docs.oracle.com/javase/8/docs/technotes/guides/intl/fontconfig.html
But it doesn't seem to help. Anybody tried something similar?

Thanks!

0
6 comments

Try adding -Djava2d.font.loadFontConf=true in Help | Edit Custom VM Options.

0
Avatar
Permanently deleted user

Hi Serge, I tried your suggestion, but it did not help. I still get the same font rendering!

0

We have our own fontconfig file bundled with the JetBrains runtime (jre/lib/fonts/font.conf), so you need to edit it and enable by the java2d.font.loadFontConf=true property. The runtime can be found in the product  folder. 

0
Avatar
Permanently deleted user

Hi Alexey, still not working :( I overwrote the font.conf in jbr/lib/fonts directory with the config mentioned above, set the VM property

-Djava2d.font.loadFontConf=true

I restarted the IDE and I still see no change in weight!

Just an FYI, I'm running

IntelliJ IDEA 2019.2.3 (Community Edition)
Build #IC-192.6817.14

0
Avatar
Permanently deleted user

I ran with the debug on and grepped for conf and got the below texts:

 

INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.2.5-arch1-1-ARCH.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.2.5-arch1-1-ARCH.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.2.5-arch1-1-ARCH.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.2.5-arch1-1-ARCH.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.bfc
INFO: Did not find a fontconfig file.
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.2.5-arch1-1-ARCH.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.2.5-arch1-1-ARCH.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.5.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.Linux.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.2.5-arch1-1-ARCH.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.2.5-arch1-1-ARCH.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.5.bfc
INFO: Looking for text fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.properties
INFO: Looking for binary fontconfig file : /home/grayhaze/Downloads/ideaIC-2019.2.3/idea-IC-192.6817.14/jbr/lib/fontconfig.bfc
INFO: Did not find a fontconfig file.
INFO: ParseFontDir /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType
INFO: fontdir=/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType

 

It looks like it says no fontconfig found. When I tried moving the fontconfig to one of the above mentioend files, it throws a NPE.

Should I file a bug report for the font.conf not getting picked up from the runtime folder?

0

Please sign in to leave a comment.