summaryrefslogtreecommitdiff
path: root/gtk2_ardour/main.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2013-02-22 15:48:44 +0000
committerRobin Gareus <robin@gareus.org>2013-02-22 15:48:44 +0000
commitdb52e09032eaeebf284ae8f8315f981ee4111613 (patch)
tree2590a6fb2b6dbaad4ca84cce732240f7e2c15bd8 /gtk2_ardour/main.cc
parent35323d7d9118f915972dedda4d5796f105b5ea45 (diff)
OSX font loading
git-svn-id: svn://localhost/ardour2/branches/3.0@14090 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/main.cc')
-rw-r--r--gtk2_ardour/main.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index ca50e4a97d..850b1141d1 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -60,6 +60,10 @@
#include "i18n.h"
+#ifdef __APPLE__
+#include <Carbon/Carbon.h>
+#endif
+
using namespace std;
using namespace Gtk;
using namespace ARDOUR_COMMAND_LINE;
@@ -217,10 +221,7 @@ fixup_bundle_environment (int, char* [])
setenv ("GDK_PIXBUF_MODULE_FILE", Glib::build_filename (bundle_dir, "Resources/gdk-pixbuf.loaders").c_str(), 1);
}
-#include <Carbon/Carbon.h>
-
static void load_custom_fonts() {
-#if 0 // untested OSX code
std::string ardour_mono_file;
if (!find_file_in_search_path (ardour_data_search_path(), "ArdourMono.ttf", ardour_mono_file)) {
@@ -231,14 +232,13 @@ static void load_custom_fonts() {
CFURLRef fontURL;
CFErrorRef error;
ttf = CFStringCreateWithBytes(
- kCFAllocatorDefault, ardour_mono_filec_str(),
+ kCFAllocatorDefault, (UInt8*) ardour_mono_file.c_str(),
ardour_mono_file.length(),
kCFStringEncodingUTF8, FALSE);
fontURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, ttf, kCFURLPOSIXPathStyle, TRUE);
if (CTFontManagerRegisterFontsForURL(fontURL, kCTFontManagerScopeProcess, &error) != true) {
cerr << _("Cannot load ArdourMono TrueType font.") << endl;
}
-#endif
}
#else