Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated juce_linux_Fonts with code from the latest version of JUCE

  • Loading branch information...
commit 281f549172f0d5b54f99ed7dd873495c281748ac 1 parent 0545411
Josh Siegle authored
View
2,057 Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj
1,163 additions, 894 deletions not shown
View
BIN  ...cOSX/open-ephys.xcodeproj/project.xcworkspace/xcuserdata/Josh.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
View
39 JuceLibraryCode/src/native/linux/juce_linux_Fonts.cpp
@@ -103,11 +103,26 @@ class LinuxFontFileIterator
{
const ScopedPointer<XmlElement> fontsInfo (XmlDocument::parse (File ("/etc/fonts/fonts.conf")));
- if (fontsInfo != 0)
+ if (fontsInfo != nullptr)
{
forEachXmlChildElementWithTagName (*fontsInfo, e, "dir")
{
- fontDirs.add (e->getAllSubText().trim());
+ String fontPath (e->getAllSubText().trim());
+
+ if (fontPath.isNotEmpty())
+ {
+ if (e->getStringAttribute ("prefix") == "xdg")
+ {
+ String xdgDataHome (SystemStats::getEnvironmentVariable ("XDG_DATA_HOME", String::empty));
+
+ if (xdgDataHome.trimStart().isEmpty())
+ xdgDataHome = "~/.local/share";
+
+ fontPath = File (xdgDataHome).getChildFile (fontPath).getFullPathName();
+ }
+
+ fontDirs.add (fontPath);
+ }
}
}
}
@@ -115,7 +130,25 @@ class LinuxFontFileIterator
if (fontDirs.size() == 0)
fontDirs.add ("/usr/X11R6/lib/X11/fonts");
- fontDirs.removeEmptyStrings (true);
+ fontDirs.removeDuplicates (false);
+
+ // if (fontDirs.size() == 0)
+ // {
+ // const ScopedPointer<XmlElement> fontsInfo (XmlDocument::parse (File ("/etc/fonts/fonts.conf")));
+
+ // if (fontsInfo != 0)
+ // {
+ // forEachXmlChildElementWithTagName (*fontsInfo, e, "dir")
+ // {
+ // fontDirs.add (e->getAllSubText().trim());
+ // }
+ // }
+ // }
+
+ // if (fontDirs.size() == 0)
+ // fontDirs.add ("/usr/X11R6/lib/X11/fonts");
+
+ // fontDirs.removeEmptyStrings (true);
}
bool next()
View
2  Source/Processors/PhaseDetector.cpp
@@ -123,7 +123,7 @@ void PhaseDetector::process(AudioSampleBuffer &buffer,
numPeakIntervals++;
// entering falling phase (just reached peak)
- if (canBeTriggered)
+ if (true)
addEvent(events, TTL, i, 1, 3);
peakIntervals[numPeakIntervals % NUM_INTERVALS] = nSamplesSinceLastPeak;
Please sign in to comment.
Something went wrong with that request. Please try again.