  
  	return NULL;
 diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c
-index be69ce1c..a24b2122 100644
+index be69ce1c..e71d4dc9 100644
 --- a/source/pdf/pdf-font.c
 +++ b/source/pdf/pdf-font.c
 @@ -54,6 +54,8 @@ static const char *base_font_names[][10] =

+
+#endif
diff --git a/source/html/html-font.c b/source/html/html-font.c
index d319a462..49ac58df 100644
--- a/source/html/html-font.c
+++ b/source/html/html-font.c
@@ -3,6 +3,47 @@
 
 #include <string.h>
 
+char *

 		const unsigned char *data;
 		int size;
 
@@ -23,6 +66,18 @@ fz_load_html_default_font(fz_context *ctx, fz_html_font_set *set, const char *fa
 			fz_throw(ctx, FZ_ERROR_GENERIC, "cannot load html font: %s", real_family);
 		set->fonts[idx] = fz_new_font_from_memory(ctx, NULL, data, size, 0, 1);
 		fz_font_flags(set->fonts[idx])->is_serif = !is_sans;
+#else
+		char *filename = html_lookup_substitute_font_from_file(ctx, family, is_mono, !is_sans, is_bold, is_italic);
+		if (!filename)
+			fz_throw(ctx, FZ_ERROR_GENERIC, "cannot load html font");
+
+		set->fonts[idx] = fz_new_font_from_file(ctx, NULL, filename, 0, 1);
+		fz_font_flags(set->fonts[idx])->is_mono = is_mono;
+		fz_font_flags(set->fonts[idx])->is_bold = is_bold;
+		fz_font_flags(set->fonts[idx])->is_italic = is_italic;
+		fz_font_flags(set->fonts[idx])->is_serif = !is_sans;
+		free(filename);
+#endif
 	}
 	return set->fonts[idx];
 }
@@ -73,7 +128,7 @@ fz_load_html_font(fz_context *ctx, fz_html_font_set *set, const char *family, in
 		return font;
 	}
 
