Has anyone else had any success (or lack of) with the techniques described above? I am running java 7 on a test linux client and after installing the ms fonts package, changing the font preference config file and running reconfiguring via dpkg, I’m still seeing native linux fonts.
In the attached file, the top half is windows, bottom is linux. Does anyone know the name of the font in the linux shot? Maybe Deja Vu Sans? I’m trying to pin it down so I can at least attack it from that direction.
Thanks for posting all the tips. Its very helpful.
Typically, the default sans-serif font in Ubuntu is Lucinda Sans. In the “60-latin.conf” file, I normally add “Arial” somewhere above “Lucinda Sans”, since the one at the top gets preference. Of course, if you change this file, you should rebuild the libfontconfig file.
The other thing is to first make sure the msttcorefonts got installed ok. They should be somewhere in one of the directories pointed to by “/etc/fonts/fonts.conf”. To make sure linux recognizes the fonts, run:
running that and grep’ing for ms gives: “/usr/share/fonts/truetype/msttcorefonts: caching, new cache contents: 60 fonts, 0 dirs”
I’ve got arial and helvetica at the top of my 60-latin.conf file 60-latin.conf.txt (1.66 KB). Did you have to reinstall java or re-download the jnlp file or anything?
Sorry, I misspoke about the default fonts - you were correct, Ubuntu default is DejaVu Sans rather than Lucinda Sans.
From my experience, you should not have to re-load Java or the jnlp file, but you may need to re-start the application. I think Java should pick this up when it starts up.
Package ttf-mscorefonts-installer is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
That’s odd, I just tried it on a fairly virgin install of Ubuntu 14.04 (only change from stock was removing IcedTea and installing Java 8 ), and it worked great.
Are you running headless or anything unusual like that? Did you disable the multiverse repositories?
Well, I’ve installed msttcorefonts on Ubuntu 10.04 and 12.04 and Java 6 and 7 using these methods with good success each time. However, I’ve used the same technique(s) on Ubuntu 14.04 with Java 8 (jre_8u25) and have had no luck getting it to work. Doesn’t seem to respect the libfontconfig settings or fontconfig.properties (or no fontconfig.properties file). The mscorefonts are installed and usable - just won’t substitute Arial for the logical Dialog font.
Any one seen this? Is this a Java 8 bug? Or something different about Ubuntu 14.04?
Unfortunately, since Ignition v7.7 requires Java 8, and I need a client to fall-back to a local gateway, I pretty much have to use Java 8 on one of the clients. Any ideas would be appreciated.
Yeah, Jordan, from what I’ve seen, the Java jre’s dropped including the fontconfig.Ubuntu.properties file quite a while back. In the Java documentation that I can find, there is mention of Java (version?) using fontconfig.properties for those Linux versions it doesn’t include explicitly (e.g. RedHat, etc.). I’ve even tried re-naming fontconfig.properties, etc. to make sure it’s not using them and it doesn’t seem to help either.
In one case, I reverted back to Ubuntu 12.04 and Java 7, and it worked as it previously has with no problem. Next try would be Ubuntu 14.04 with Java 7, but it may be awhile before I get time to try it.
Got some time this morning to dig into this a bit more. Got things working with 14.04 and java 8 (yay!)
Instead of deleting the fontconfig.Ubuntu.propeties file, I modified it, including the corefonts (Arial, Times New Roman, Courier New) fontconfig.Ubuntu1404.properties (14.9 KB)
I know this is an old topic, but I am attempting to get the Dialog font changed to Arial to match the Windows clients. I am attempting this on a Raspberry Pi 3. The client runs fine on it, except none of the above instructions have worked on getting the font corrected.
There is no fontconfig.properties file, but there is fontconfig.properties.src and also fontconfig.properties.Redhat.6.src, and similars (Turbo, etc).
Tried different combinations. Renaming the fontconfig.properties (downloaded form this thread) to fontconfig.properties.src and placing it in the /jre/lib/ path. Modified the 60-latin.conf in /etc/fonts/conf.avail.
Thoughts? Has anyone done this with in Raspian?
Any assistance would be greatly appreciated. Thanks.
A fresh install of Oracle Java 8 on Ubuntu 16.04 amd64 gave the opportunity to re-test the instructions in this topic. Out-of-the-box the Ignition applications designed on the Windows platform work OK, but the font appearance and spacing is off. Installing the msttcorefonts core fonts package does by itself not fix the problem because Java is separately configured to continue using DejaVu Serif, DejaVu Sans, and DejaVu Sans Mono instead of Times New Roman, Arial, and Courier New.
The Java font file /usr/lib/jvm/java-8-oracle/jre/lib/fontconfig.Ubuntu.properties can be modified manually or by installing the fontconfig.Ubuntu1404.properties (14.9 KB)
posted in this thread by user JordanCClark on Tue Apr 28, 2015. A diff showed that the only differences are that the font names are replaced and locations for the msttcorefonts are added. Note that a Java update can re-install the original fontconfig.Ubuntu.properties file, so you may want to keep a copy of your font modifications available.
It only responds to $HOME/.java/fonts config file and not the fontconfig.properties files. It appears that the problem is fixed in Java 9 beta. We will have to wait for Java 9 on Raspberry PI before we can have a properly fixed solution.