Font handling, and an audio device-related crash fix. #17

Merged
merged 10 commits into from Dec 17, 2012

2 participants

@akmokhtari

The 2.0 update isn't here, sadly, but here are a few (hopefully useful) changes:

  • Error handling for getting the audio device. If you've got (for example) a browser open, it might hog control of the audio source, causing the program to crash. This implements a retry/quit dialog so that users can at least get an idea of what the problem is.

  • Added serialized cpmono fonts, and set CustomLookAndFeel up to handle them. You can now use Font("Paragraph Font", fontSize, Font::fontStyle) to create fonts. I admit that it's not clear to me whether people will like this abstraction, so perhaps it should be modified again so that you can use the typeface names directly: Font("CPMono Bold", fontSize, Font::fontStyle).

  • Removed some obsolete macros.

akmokhtari added some commits Nov 15, 2012
@akmokhtari akmokhtari Added serialized CPMono fonts 3c4d1c6
@akmokhtari akmokhtari Implemented error handling for audio device initialization
If there was a problem initializing the AudioDeviceManager, we show an
AlertWindow with Retry/Quit options.  Unfortunately, this doesn't fix the bug I
was initially trying to fix, because sometimes initialize() returns OK while
setting the AudioDeviceManager to null.
f92cfd1
@akmokhtari akmokhtari Error handling for when an audio device isn't found
Sometimes initialize() returns no error string, but will not find an audio
device, leaving aIOd == null.  This checks for that, and aborts the app with an
informational dialog window if so.
0f0bedd
@akmokhtari akmokhtari Fixed EditorViewport crash on keypresses
Before, EditorViewport would start accessing arrays on keypresses (specifically
the arrow keys) even when there were no editors.  This adds an extra check to
prevent this.
2ef4ec7
@akmokhtari akmokhtari Merge branch 'master' of https://github.com/open-ephys/GUI 3fe158f
@akmokhtari akmokhtari Added font files to BinaryData d61c1f5
@akmokhtari akmokhtari Added embedded typeface handling to CustomLookAndFeel
Added typeface initialization to CustomLookAndFeel, and implemented
getTypefaceForFont().

Fonts can now be created using a more centralized method, by calling the
Font(String("Typeface Name"), fontHeight, Font::style) constructor.  Names for
the typefaces ("Default Light", "Paragraph") should be regarded as tentative.

There's also simpler code to do the same thing that should be uncommented after
the 2.0 update (it uses HashMap, which is not currently in our library code,
even though it's in the 1.53 docs.)
6558238
@akmokhtari akmokhtari Removed deprecated Juce T() macros 2dc0abb
@akmokhtari akmokhtari Merge branch 'master' of https://github.com/open-ephys/GUI
Conflicts:
	Builds/MacOSX/open-ephys.xcodeproj/project.pbxproj
	JuceLibraryCode/BinaryData.cpp
	JuceLibraryCode/JuceHeader.h
4a4cb7a
@akmokhtari akmokhtari Merge branch 'master' of https://github.com/open-ephys/GUI 207c411
@open-ephys open-ephys merged commit e97166e into open-ephys:master Dec 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment