summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-04-02 12:39:31 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-04-02 12:39:53 +0300
commit6b6ca3d1168323651e87c51268b5c0c37532999b (patch)
tree3bc7db85ddd593df65e5396edcb46dba7017f491
parent366cba7d6f3a100d51b576927dde446ab36e9483 (diff)
Automate setting of FONTCONFIG_FILE
-rw-r--r--android/Bootstrap/src/org/libreoffice/android/Bootstrap.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
index 443b770f90d5..98df770b494d 100644
--- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
+++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java
@@ -127,6 +127,18 @@ public class Bootstrap extends NativeActivity
// Extract files from the .apk that can't be used mmapped directly from it
extract_files();
+
+ // If we notice that a fonts.conf file was extracted, automatically
+ // set the FONTCONFIG_FILE env var.
+ InputStream i;
+ try {
+ i = activity.getAssets().open("unpack/etc/fonts/fonts.conf");
+ }
+ catch (java.io.IOException e) {
+ i = null;
+ }
+ if (i != null)
+ putenv("FONTCONFIG_FILE=" + dataDir + "/etc/fonts/fonts.conf");
}
@Override