mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-24 17:44:19 +08:00
Try to load font from the relative path, if failed, try to load font from the system resource path.
This commit is contained in:
+4
-3
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user