diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2019-07-27 21:19:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-27 21:19:45 -0500 |
| commit | 56ddd024ebfdcbb8b7d4e5790cb422e51570248d (patch) | |
| tree | 817f66ed71237c7f96d4c4d8cabf2a6ed0061f61 | |
| parent | c09fdc49a79ed3ac45b2d2e2392a6e5a367cf283 (diff) | |
Fall back to Sans if no font setting found
Sigh...
| -rw-r--r-- | src/text_file_functions.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index 72476255..5a34ac8b 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -226,14 +226,16 @@ pos_size_type AOApplication::get_element_dimensions(QString p_identifier, QStrin } QString AOApplication::get_font_name(QString p_identifier, QString p_file) { - QString design_ini_path = get_theme_path(p_file); - QString f_result = read_design_ini(p_identifier, design_ini_path); - QString default_path = get_default_theme_path(p_file); - if(f_result == "") - { - f_result = read_design_ini(p_identifier, default_path); - } - return f_result; + QString design_ini_path = get_theme_path(p_file); + QString f_result = read_design_ini(p_identifier, design_ini_path); + QString default_path = get_default_theme_path(p_file); + if (f_result == "") + { + f_result = read_design_ini(p_identifier, default_path); + if (f_result == "") + return "Sans"; + } + return f_result; } int AOApplication::get_font_size(QString p_identifier, QString p_file) { |
