change the way font specifications are used in UI config files

If no font family is specified, enforce use of Sans to match GTK behaviour (which we inadvertently relied on, it appears)
This commit is contained in:
Paul Davis 2014-06-19 11:18:37 -04:00
parent 280fc81e05
commit 01df705f70
5 changed files with 72 additions and 41 deletions

View file

@ -206,6 +206,18 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
return (savergb);
}
Pango::FontDescription
sanitized_font (std::string const& name)
{
Pango::FontDescription fd (name);
if (fd.get_family().empty()) {
fd.set_family ("Sans");
}
return fd;
}
Pango::FontDescription
get_font_for_style (string widgetname)
{