Skip to content
Snippets Groups Projects
Commit b090e164 authored by jsiegle's avatar jsiegle
Browse files

Upgraded code in juce_linux_Fonts

parent 281f5491
No related branches found
No related tags found
No related merge requests found
......@@ -145,10 +145,17 @@ public:
*/
static int getPageSize();
/** Returns an environment variable.
If the named value isn't set, this will return the defaultValue string instead.
*/
static String getEnvironmentVariable (const String& name, const String& defaultValue);
//==============================================================================
// not-for-public-use platform-specific method gets called at startup to initialise things.
static void initialiseStats();
private:
struct CPUFlags
{
......
......@@ -103,7 +103,7 @@ public:
{
const ScopedPointer<XmlElement> fontsInfo (XmlDocument::parse (File ("/etc/fonts/fonts.conf")));
if (fontsInfo != nullptr)
if (fontsInfo != 0)
{
forEachXmlChildElementWithTagName (*fontsInfo, e, "dir")
{
......@@ -113,10 +113,10 @@ public:
{
if (e->getStringAttribute ("prefix") == "xdg")
{
String xdgDataHome (SystemStats::getEnvironmentVariable ("XDG_DATA_HOME", String::empty));
String xdgDataHome = "~/.local/share";//(SystemStats::getEnvironmentVariable ("XDG_DATA_HOME", String::empty));
if (xdgDataHome.trimStart().isEmpty())
xdgDataHome = "~/.local/share";
// if (xdgDataHome.trimStart().isEmpty())
// xdgDataHome = "~/.local/share";
fontPath = File (xdgDataHome).getChildFile (fontPath).getFullPathName();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment