Allow using ArdourSans as optional default font

This commit is contained in:
Robin Gareus 2019-12-04 22:59:51 +01:00
parent d8c63568a5
commit 8f31f814b4
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 22 additions and 11 deletions

View file

@ -282,12 +282,12 @@ style "status_bar_box"
style "very_small_text" style "very_small_text"
{ {
font_name = "@FONT_SMALLER@" font_name = "@FONTFAMILY@ @FONT_SMALLER@"
} }
style "small_text" style "small_text"
{ {
font_name = "@FONT_SMALL@" font_name = "@FONTFAMILY@ @FONT_SMALL@"
} }
style "small_clock" style "small_clock"
@ -297,22 +297,22 @@ style "small_clock"
style "small_italic_text" style "small_italic_text"
{ {
font_name = "italic @FONT_SMALL@" font_name = "@FONTFAMILY@ italic @FONT_SMALL@"
} }
style "small_bold_text" style "small_bold_text"
{ {
font_name = "bold @FONT_SMALL@" font_name = "@FONTFAMILY@ bold @FONT_SMALL@"
} }
style "medium_bold_text" style "medium_bold_text"
{ {
font_name = "bold @FONT_NORMAL@" font_name = "@FONTFAMILY@ bold @FONT_NORMAL@"
} }
style "medium_text" style "medium_text"
{ {
font_name = "@FONT_NORMAL@" font_name = "@FONTFAMILY@ @FONT_NORMAL@"
} }
style "medium_monospace_text" style "medium_monospace_text"
@ -329,12 +329,12 @@ style "red_medium_text" = "medium_text"
style "large_bold_text" style "large_bold_text"
{ {
font_name = "bold @FONT_LARGE@" font_name = "@FONTFAMILY@ bold @FONT_LARGE@"
} }
style "big_text" style "big_text"
{ {
font_name = "@FONT_BIG@" font_name = "@FONTFAMILY@ @FONT_BIG@"
} }
style "bigger_clock" style "bigger_clock"
@ -344,7 +344,7 @@ style "bigger_clock"
style "larger_text" style "larger_text"
{ {
font_name = "@FONT_LARGE@" font_name = "@FONTFAMILY@ @FONT_LARGE@"
} }
style "massive_clock" style "massive_clock"
@ -354,7 +354,7 @@ style "massive_clock"
style "big_bold_text" style "big_bold_text"
{ {
font_name = "bold @FONT_LARGER@" font_name = "@FONTFAMILY@ bold @FONT_LARGER@"
} }
style "plugin_name_text" = "big_bold_text" style "plugin_name_text" = "big_bold_text"

View file

@ -21,6 +21,7 @@
UI_CONFIG_VARIABLE (std::string, icon_set, "icon-set", "default") UI_CONFIG_VARIABLE (std::string, icon_set, "icon-set", "default")
UI_CONFIG_VARIABLE (std::string, ui_rc_file, "ui-rc-file", "clearlooks.rc") UI_CONFIG_VARIABLE (std::string, ui_rc_file, "ui-rc-file", "clearlooks.rc")
UI_CONFIG_VARIABLE (std::string, ui_font_family, "ui-font-family", "Sans")
UI_CONFIG_VARIABLE (std::string, color_file, "color-file", "dark") UI_CONFIG_VARIABLE (std::string, color_file, "color-file", "dark")
UI_CONFIG_VARIABLE (bool, flat_buttons, "flat-buttons", false) UI_CONFIG_VARIABLE (bool, flat_buttons, "flat-buttons", false)
UI_CONFIG_VARIABLE (bool, boxy_buttons, "boxy-buttons", false) UI_CONFIG_VARIABLE (bool, boxy_buttons, "boxy-buttons", false)

View file

@ -277,7 +277,8 @@ ARDOUR_UI_UTILS::sanitized_font (std::string const& name)
Pango::FontDescription fd (name); Pango::FontDescription fd (name);
if (fd.get_family().empty()) { if (fd.get_family().empty()) {
fd.set_family ("Sans"); /* default: "Sans" or "ArdourSans" */
fd.set_family (UIConfiguration::instance ().get_ui_font_family ());
} }
return fd; return fd;

View file

@ -822,6 +822,7 @@ def build(bld):
key = font_sym key = font_sym
font_subst_dict[key] = text font_subst_dict[key] = text
font_subst_dict['FONTFAMILY'] = ''
# RC file # RC file
obj = bld(features = 'subst') obj = bld(features = 'subst')
@ -830,6 +831,14 @@ def build(bld):
obj.install_path = bld.env['CONFDIR'] obj.install_path = bld.env['CONFDIR']
set_subst_dict(obj, font_subst_dict) set_subst_dict(obj, font_subst_dict)
font_subst_dict['FONTFAMILY'] = 'ArdourSans'
obj = bld(features = 'subst')
obj.source = [ 'clearlooks.rc.in' ]
obj.target = 'clearlooks.ardoursans.rc'
obj.install_path = bld.env['CONFDIR']
set_subst_dict(obj, font_subst_dict)
obj = bld(features = 'subst') obj = bld(features = 'subst')
obj.source = [ 'default_ui_config.in' ] obj.source = [ 'default_ui_config.in' ]
obj.target = 'default_ui_config' obj.target = 'default_ui_config'