mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 13:45:43 +01:00
Add API to force ArdourSans font (for UTF8 symbols)
This commit is contained in:
parent
e8a87f31fc
commit
ef6803abd1
3 changed files with 18 additions and 0 deletions
|
|
@ -284,6 +284,22 @@ ARDOUR_UI_UTILS::sanitized_font (std::string const& name)
|
|||
return fd;
|
||||
}
|
||||
|
||||
Pango::FontDescription
|
||||
ARDOUR_UI_UTILS::ardour_font (std::string const& name)
|
||||
{
|
||||
Pango::FontDescription fd (name);
|
||||
if (!fd.get_family().empty() && fd.get_family().find ("Mon") != std::string::npos) {
|
||||
/* matches "ArdourMono", "Monaco" */
|
||||
fd.set_family ("ArdourMono");
|
||||
} else {
|
||||
fd.set_family ("ArdourSans");
|
||||
}
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Pango::FontDescription
|
||||
ARDOUR_UI_UTILS::get_font_for_style (string widgetname)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue