summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2010-01-15 22:51:07 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2010-01-15 22:51:07 +0000
commit6061cc3103206883e3d44930912421c2159fc823 (patch)
tree96a9843dc0959ab076db5835814807dc7cdd9f08
parentf7cc98752fde7c7071dc3a605e19db1885ab3f96 (diff)
downloadnetsurf-6061cc3103206883e3d44930912421c2159fc823.tar.gz
netsurf-6061cc3103206883e3d44930912421c2159fc823.tar.bz2
More helpful font open error
svn path=/trunk/netsurf/; revision=9809
-rw-r--r--amiga/font.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/amiga/font.c b/amiga/font.c
index 609887075..1862caa38 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -402,7 +402,33 @@ void ami_init_fonts(void)
for(i=PLOT_FONT_FAMILY_SANS_SERIF;i<=PLOT_FONT_FAMILY_FANTASY;i++)
{
- if(!of[i]) warn_user("FontError",""); // temporary error message
+ if(!of[i])
+ {
+ char *tmpfontname = NULL;
+ switch(i)
+ {
+ case PLOT_FONT_FAMILY_SANS_SERIF:
+ tmpfontname = option_font_sans;
+ break;
+ case PLOT_FONT_FAMILY_SERIF:
+ tmpfontname = option_font_serif;
+ break;
+ case PLOT_FONT_FAMILY_MONOSPACE:
+ tmpfontname = option_font_mono;
+ break;
+ case PLOT_FONT_FAMILY_CURSIVE:
+ tmpfontname = option_font_cursive;
+ break;
+ case PLOT_FONT_FAMILY_FANTASY:
+ tmpfontname = option_font_fantasy;
+ break;
+ default:
+ /* should never get here, but just in case */
+ tmpfontname = strdup("{unknown font}");
+ break;
+ }
+ warn_user("CompError",tmpfontname);
+ }
if(bname = (char *)GetTagData(OT_BName,0,of[i]->olf_OTagList))
{