From 38374e7aa546cd40fd671096ac9f802c78aa9bf6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 31 Jan 2013 07:41:37 +0000 Subject: [PATCH] OSX CoreText font loading, updated ArdourMono font-family name git-svn-id: svn://localhost/ardour2/branches/3.0@14042 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ArdourMono.ttf | Bin 116824 -> 116760 bytes gtk2_ardour/main.cc | 28 ++++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/ArdourMono.ttf b/gtk2_ardour/ArdourMono.ttf index e6f91cda836247676715daa9998a055937757960..d4c93d1f91b6b6610385a34134eb5ca9da29c182 100644 GIT binary patch delta 641 zcmXYuOK1~O6o&tEXC_HIlT=DJam&blNcq8W$QL zbRjN`h$MnR7d}c*aU(%cR1maOL9mNZTNf%W6rmeI(10iLEH3x^|8vjd-ditv%SCSi z1fT-#`i^Iw-&Fx1Srq?NZhgAKgY5~!1oo<$Koe);oX(d z4AAuyQ0tOz%E^A{e+2lq0bV0zXI<#sl1qi)m?Q!h9Yy40rIX=nf!!x#% z*#9~933R6n7<=5=Y_6gIjDe~=aIfiR67H^N%jbdM5D$C?w2{;J1tOKadAMWf7y5i` z0Pms;%}8s%Fi5pQqN}$H?ReaJE>7i3y%*N7g$9Imv{O>pfJK*tJ?uXe_8~}LgiZ7) zp03#n79#3_upbd^r*HsUwdYMP@S#qay5hegy^U3x*MBAiaZ^|!fEU6V#!wg5x$$0M z10gyt>|wtw?85*(5jL@dehXVTs5Xy_@UvJE4q!r?67EEo_PzA&F5NF(nWy!o>OH#A XqS~Q(s;F9{N}=A;@EZzg(S^2uh3t4F delta 715 zcmY+CO=uHA6vzK>XE(ccH?foutF&~Xl~$z{a*%>OSc&msBiIUpLc64Cf_9r_6K#8G zP!YTcDM6wKKk%!icu*8_QADaJsHcjE@uWqRBJ`jj*orUhc-@#yZTp<6!^J==E0@p8|BA^-$7vyx+%j zMZoyM2@=Uuc{_Hc&j%u}0i}M#OS`#+)_XuO2IyMa$$5N^&iM?Ex6-4Ng^^8YtpY8J zpmWbMDQ9?f(jVjlEZ(py!w&PPa+x(JKwHMmPniC)&H5`Rv_`W@=j~YjBhbi054g^R zr!6Vtyq@9x_L$?Q7I$y^1-d;8XotLPF2AaNkAmh_fM(P4qbaZV@rN@&_yAWtwRRhP z8S{xp?%>9rpJ=HS3cTqoUHCVjwW(qgm2MSGRMrAGlABtPEYMCnB&#s#gk%jCO-l}- zjvh)j5TI_QaH6W#PjvV~*H*27W+S$vWl!hpz1Za_pVm*3r? zyXEQ()fwpZhqEVryF5KZH~x23_Ri8xrSf@>wlueMZ(K4zDr~k2_e$b4TmGV~_;J@q MdF2Id7M-P`zwdK_(EtDd diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 381f97d82f..8b7a8772b2 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -217,6 +217,30 @@ 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)) { + cerr << _("Cannot find ArdourMono TrueType font") << endl; + } + + CFStringRef ttf; + CFURLRef fontURL; + CFErrorRef error; + ttf = CFStringCreateWithBytes( + kCFAllocatorDefault, ardour_mono_filec_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 void @@ -319,8 +343,6 @@ fixup_bundle_environment (int /*argc*/, char* argv[]) } -#endif - static void load_custom_fonts() { std::string ardour_mono_file; if (!find_file_in_search_path (ardour_data_search_path(), "ArdourMono.ttf", ardour_mono_file)) { @@ -338,6 +360,8 @@ static void load_custom_fonts() { } } +#endif + static gboolean tell_about_jack_death (void* /* ignored */) {