Try to load font from the relative path, if failed, try to load font from the system resource path.

This commit is contained in:
Vincent Wei
2019-05-28 18:06:54 +08:00
parent 09667150e8
commit ec330b1fea
+4 -3
View File
@@ -1057,10 +1057,11 @@ static BOOL init_or_term_specifical_fonts (char* etc_section, BOOL is_unload)
else {
/* [DK] Fix Bug #4801, which introduce a absolute path check error in Windows,
* first to load from sytem res path, else load it directly(relative or absolute path).*/
if ((0 == mg_path_joint(font_path, MAX_PATH + 1, sysres_get_system_res_path(), font_file))
&& ((add_dev_font (font_name, font_path, TRUE)) == TRUE))
if ((add_dev_font (font_name, font_file, TRUE)) == TRUE)
added_num++;
else if ((add_dev_font (font_name, font_file, TRUE)) == TRUE)
else if ((0 == mg_path_joint(font_path, MAX_PATH + 1,
sysres_get_system_res_path(), font_file))
&& ((add_dev_font (font_name, font_path, TRUE)) == TRUE))
added_num++;
}
}