← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1485332 into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1485332 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1485332 in widelands: ""Standard is not a field in this table." when accessing Options"
  https://bugs.launchpad.net/widelands/+bug/1485332

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1485332/+merge/270007

Improved error message for when a locale wants a non-existing fontset.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1485332 into lp:widelands.
=== modified file 'src/graphic/text/font_set.cc'
--- src/graphic/text/font_set.cc	2015-01-31 16:03:59 +0000
+++ src/graphic/text/font_set.cc	2015-09-03 07:19:27 +0000
@@ -111,6 +111,11 @@
 
 				// Read the fontset for the current locale.
 				try {
+					if (!fonts_table->has_key(fontsetname)) {
+						log("Font set '%s' for locale '%s' does not exist; using default instead.\n",
+							 fontsetname.c_str(), actual_localename.c_str());
+						fontsetname = "default";
+					}
 					std::unique_ptr<LuaTable> font_set_table = fonts_table->get_table(fontsetname);
 					font_set_table->do_not_warn_about_unaccessed_keys();
 


Follow ups