summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2021-01-31 00:07:01 +0100
committerAndras Timar <andras.timar@collabora.com>2021-01-31 00:07:01 +0100
commit21c0aab3a710fd917d6ec6435dcb1ef5885f79e6 (patch)
treefcebf8f5d34dbbaaf17c6ac58714004bd263aa61
parent0135cdee768fcea2e628452509e380c39bafc8ec (diff)
Change-Id: If11d784ffb38038f587a62358f15babb29e2ce3e
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 7684763c0cca..5405d54ca08b 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <memory>
#include <iostream>
-#include <fstream>
#include <unx/fontmanager.hxx>
#include <unx/helper.hxx>
#include <comphelper/sequence.hxx>
@@ -91,14 +90,12 @@ FontCfgWrapper::FontCfgWrapper()
{
std::cerr << "next: FcInit()" << std::endl;
setenv("FC_DEBUG", "1024", 1);
- std::ifstream conf("/etc/fonts/fonts.conf");
- if(!conf)
+ if(getenv("SNAP"))
{
- std::cerr << "/etc/fonts/fonts.conf is not readable from LO core" << std::endl;
- std::cerr << "Snap: " << getenv("SNAP") << std::endl;
+ std::string fontconfigPath(getenv("SNAP"));
+ fontconfigPath += "/etc/fonts";
+ setenv("FONTCONFIG_PATH", fontconfigPath.c_str(), 1);
}
- else
- std::cerr << "/etc/fonts/fonts.conf is readable from LO core" << std::endl;
FcInit();
std::cerr << "FcInit() OK" << std::endl;
}