Provide an informative error message if something goes wrong in setfont

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