RISC OS: initialise font subsystem after Wimp_Initialise

If RUfl detects it is running in a Wimp task it will display a
progress meter while scanning fonts. We had this behaviour until
~2017, when it became broken due to the font initialisation being
moved before the call to Wimp_Initialise (because the hotlist
display logic got moved to the treeview, which needs fonts set up)

Move both the font and hotlist initialisation after the call to
Wimp_Initialise to restore the desired behaviour.
This commit is contained in:
John-Mark Bell 2021-08-15 05:44:52 +01:00
parent d51cf1a789
commit 862756a1a4

View File

@ -1231,16 +1231,9 @@ static nserror gui_init(int argc, char** argv)
/* Initialise save complete functionality */
save_complete_init();
/* Initialise the font subsystem */
nsfont_init();
/* Load in visited URLs, Cookies, and hostlist */
/* Load in visited URLs and Cookies */
urldb_load(nsoption_charp(url_path));
urldb_load_cookies(nsoption_charp(cookie_file));
hotlist_init(nsoption_charp(hotlist_path),
nsoption_bool(external_hotlists) ?
NULL :
nsoption_charp(hotlist_save));
/* Initialise with the wimp */
error = xwimp_initialise(wimp_VERSION_RO38, task_name,
@ -1271,6 +1264,15 @@ static nserror gui_init(int argc, char** argv)
ro_message_register_route(message_WINDOW_INFO,
ro_msg_window_info);
/* Initialise the font subsystem (must be after Wimp_Initialise) */
nsfont_init();
/* Initialise the hotlist (must be after fonts) */
hotlist_init(nsoption_charp(hotlist_path),
nsoption_bool(external_hotlists) ?
NULL :
nsoption_charp(hotlist_save));
/* Initialise global information */
ro_gui_get_screen_properties();
ro_gui_wimp_get_desktop_font();