Fontconfig error - "out of memory"
I am trying to launch the Android Studio on Xubuntu. When I type ./studio.sh in terminal I get this error:
Fontconfig error: "/etc/fonts/conf.d/65-khmer.conf", line 14: out of memory
Fontconfig error: "/etc/fonts/conf.d/65-khmer.conf", line 23: out of memory
Fontconfig error: "/etc/fonts/conf.d/65-khmer.conf", line 32: out of memory
BUT the android studio launches and it seems to work without any problems. Why am I getting this error and how can I fix it?
It is a bug in Khmer fonts, see https://bugs.launchpad.net/ubuntu/+source/fonts-khmeros/+bug/1254967.
If it bothers you and you do not need Khmer fonts, you can get rid of it removing (with configuration) the fonts:
apt-get purge fonts-khmeros-core
If you need the fonts, there are various workarounds in the aforementioned bug. The most correct way seems to edit the failing file and remove the <match>
and </match>
tags, as explained here: http://permalink.gmane.org/gmane.linux.debian.devel.bugs.general/1095401
According to this bug report, installing the latest DEB for this package (the Khmer OS font) from here also solves the issue. Looks like the bug was resolved for Trusty, but was never backported to the Saucy repository.
Broadly speaking, the "error message" is just a symptom while actual functionality that breaks/misbehaves is the root cause. By uninstalling the package, we are fixing the symptom while getting rid of the functionality itself.