Custom Monospace font for clocks and such (no dot in zero).
ArdourMono is a renamed version of https://www.google.com/webfonts/specimen/Droid+Sans+Mono distributed under Apache License, version 2.0. Since the name Droid(R) is registered by Google Inc it was renamed to ArdourMono - otherwise the .tff is unchanged (build 112) git-svn-id: svn://localhost/ardour2/branches/3.0@14026 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
abc9e6405a
commit
eb369215ae
|
@ -10,7 +10,7 @@ style "small_text"
|
||||||
|
|
||||||
style "small_mono_text"
|
style "small_mono_text"
|
||||||
{
|
{
|
||||||
font_name = "monospace bold @FONT_SMALL@"
|
font_name = "ArdourMono @FONT_SMALL@"
|
||||||
}
|
}
|
||||||
|
|
||||||
style "small_italic_text"
|
style "small_italic_text"
|
||||||
|
@ -35,7 +35,7 @@ style "medium_text"
|
||||||
|
|
||||||
style "medium_monospace_text"
|
style "medium_monospace_text"
|
||||||
{
|
{
|
||||||
font_name = "monospace @FONT_SIZE_NORMAL@"
|
font_name = "ArdourMono @FONT_SIZE_NORMAL@"
|
||||||
}
|
}
|
||||||
|
|
||||||
style "red_medium_text" = "medium_text"
|
style "red_medium_text" = "medium_text"
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
#include <gtkmm2ext/popup.h>
|
#include <gtkmm2ext/popup.h>
|
||||||
#include <gtkmm2ext/utils.h>
|
#include <gtkmm2ext/utils.h>
|
||||||
|
|
||||||
|
#include <fontconfig/fontconfig.h>
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "ardour_ui.h"
|
#include "ardour_ui.h"
|
||||||
|
@ -323,6 +325,17 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
|
||||||
|
|
||||||
#endif
|
#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)) {
|
||||||
|
cerr << _("Cannot find ArdourMono TrueType font") << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
FcConfig *config = FcInitLoadConfigAndFonts();
|
||||||
|
FcBool ret = FcConfigAppFontAddFile(config, reinterpret_cast<const FcChar8*>(ardour_mono_file.c_str()));
|
||||||
|
ret = FcConfigSetCurrent(config);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
tell_about_jack_death (void* /* ignored */)
|
tell_about_jack_death (void* /* ignored */)
|
||||||
{
|
{
|
||||||
|
@ -387,6 +400,8 @@ int main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
fixup_bundle_environment (argc, argv);
|
fixup_bundle_environment (argc, argv);
|
||||||
|
|
||||||
|
load_custom_fonts(); /* needs to happend before any gtk and pango init calls */
|
||||||
|
|
||||||
if (!Glib::thread_supported()) {
|
if (!Glib::thread_supported()) {
|
||||||
Glib::thread_init();
|
Glib::thread_init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,6 +273,7 @@ def configure(conf):
|
||||||
uselib_store='GNOMECANVASMM', atleast_version='2.16')
|
uselib_store='GNOMECANVASMM', atleast_version='2.16')
|
||||||
autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
|
autowaf.check_pkg(conf, 'ogg', uselib_store='OGG', atleast_version='1.1.2')
|
||||||
autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.1', mandatory=False)
|
autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.1', mandatory=False)
|
||||||
|
autowaf.check_pkg(conf, 'fontconfig', uselib_store='FONTCONFIG')
|
||||||
|
|
||||||
conf.write_config_header('gtk2ardour-config.h', remove=False)
|
conf.write_config_header('gtk2ardour-config.h', remove=False)
|
||||||
|
|
||||||
|
@ -393,7 +394,7 @@ def build(bld):
|
||||||
|
|
||||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
||||||
|
|
||||||
obj.uselib = 'UUID FLAC GLIBMM GTHREAD GTK OGG ALSA CURL DL'
|
obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG ALSA CURL DL'
|
||||||
obj.uselib += ' GTKMM GNOMECANVASMM GNOMECANVAS '
|
obj.uselib += ' GTKMM GNOMECANVASMM GNOMECANVAS '
|
||||||
obj.uselib += ' AUDIOUNITS OSX GTKOSX '
|
obj.uselib += ' AUDIOUNITS OSX GTKOSX '
|
||||||
obj.use = [ 'libpbd',
|
obj.use = [ 'libpbd',
|
||||||
|
@ -528,7 +529,7 @@ def build(bld):
|
||||||
'MASSIVE' : '60',
|
'MASSIVE' : '60',
|
||||||
}
|
}
|
||||||
font_names = {
|
font_names = {
|
||||||
'BOLD_MONOSPACE' : 'monospace bold'
|
'BOLD_MONOSPACE' : 'ArdourMono'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set up font substitution dictionary
|
# Set up font substitution dictionary
|
||||||
|
@ -659,6 +660,7 @@ def build(bld):
|
||||||
bld.install_files('${DATADIR}/ardour3/icons', bld.path.ant_glob('icons/*.png'))
|
bld.install_files('${DATADIR}/ardour3/icons', bld.path.ant_glob('icons/*.png'))
|
||||||
bld.install_files('${DATADIR}/ardour3/pixmaps', bld.path.ant_glob('pixmaps/*.xpm'))
|
bld.install_files('${DATADIR}/ardour3/pixmaps', bld.path.ant_glob('pixmaps/*.xpm'))
|
||||||
bld.install_files('${DATADIR}/ardour3', 'splash.png')
|
bld.install_files('${DATADIR}/ardour3', 'splash.png')
|
||||||
|
bld.install_files('${DATADIR}/ardour3', 'ArdourMono.ttf')
|
||||||
|
|
||||||
# Default UI configuration
|
# Default UI configuration
|
||||||
bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf')
|
bld.install_files('${SYSCONFDIR}/ardour3', 'ardour3_ui_default.conf')
|
||||||
|
|
|
@ -520,6 +520,7 @@ fi
|
||||||
# share stuff
|
# share stuff
|
||||||
|
|
||||||
cp -R ../../gtk2_ardour/splash.png $Shared
|
cp -R ../../gtk2_ardour/splash.png $Shared
|
||||||
|
cp -R ../../gtk2_ardour/ArdourMono.ttf $Shared
|
||||||
|
|
||||||
# go through and recursively remove any .svn dirs in the bundle
|
# go through and recursively remove any .svn dirs in the bundle
|
||||||
for svndir in `find $APPDIR -name .svn -type d`; do
|
for svndir in `find $APPDIR -name .svn -type d`; do
|
||||||
|
|
Loading…
Reference in New Issue
Block a user