From db52e09032eaeebf284ae8f8315f981ee4111613 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 22 Feb 2013 15:48:44 +0000 Subject: [PATCH] OSX font loading git-svn-id: svn://localhost/ardour2/branches/3.0@14090 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/main.cc | 10 +++++----- 1 file 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 +#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 - 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