Provide an informative error message if something goes wrong in setfont [backport to 1.4.x]

Five minutes to update the code, one hour fighting with github.